rugged will not be linked correctly when built in a path containing a whitespace, problem with pkg-config?

Đang mở
#772 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
c, cmake, ruby
Lĩnh vực
build-system

Hướng nghiên cứu

Bản tái hiện chạy ext/rugged/extconf.rb và build libgit2 được vendored trong vendor/libgit2; hãy bắt đầu bằng cách lần theo cách entry point đó truyền các đường dẫn cho pkg-config và CMake. Tái hiện quá trình build từ một thư mục có chứa khoảng trắng trong đường dẫn và so sánh với các lệnh pkg-config thủ công. Được xem là hoàn tất khi build liên kết thành công từ một đường dẫn như vậy, hoặc khi hành vi của dependency được ghi lại cùng với một thay đổi có thể thực hiện trong project đã được xác định.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Rugged will not be linked correctly when you build it in a path containing a whitespace, you will get undefined symbol errors.

git submodule update --init
Submodule 'vendor/libgit2' (https://github.com/libgit2/libgit2.git) registered for path 'vendor/libgit2'
Cloning into '/home/wiebelt/Projects/spa tie/rugged/vendor/libgit2'...
Submodule path 'vendor/libgit2': checked out '838a2f2918b6d9fad8768d2498575ff5d75c35f0'
mkdir -p tmp/x86_64-linux/rugged/2.5.3
cd tmp/x86_64-linux/rugged/2.5.3
/usr/bin/ruby -I. ../../../../ext/rugged/extconf.rb
checking for gmake... yes
checking for cmake... yes
checking for pkg-config... yes
-- cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo
-- /usr/bin/gmake
Package /home/wiebelt/Projects/spa was not found in the pkg-config search path.
Perhaps you should add the directory containing `/home/wiebelt/Projects/spa.pc'
to the PKG_CONFIG_PATH environment variable
Package '/home/wiebelt/Projects/spa', required by 'virtual:world', not found
Package 'tie/rugged/ext/rugged/../../vendor/libgit2/build/libgit2.pc', required by 'virtual:world', not found
checking for -lgit2... yes
checking for git2.h... yes
creating Makefile
cd -
cd tmp/x86_64-linux/rugged/2.5.3
/usr/bin/gmake
gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I../../../../ext/rugged -DHAVE_GIT2_H "-I/home/wiebelt/Projects/spa tie/rugged/ext/rugged/../../vendor/libgit2/include" -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -g -Wall -Wno-comment -m64 -o rugged.o -c ../../../../ext/rugged/rugged.c
... and it will compile just fine ...

When i run pkg-config by hand it seems like it does not handle quotes (single or double), using a backslash to escape the whitespace doesn't work either.

pkg-config --libs --static "/var/lib/jenkins/bui ld/rugged/ext/rugged/../../vendor/libgit2/build/libgit2.pc"
Package /var/lib/jenkins/bui was not found in the pkg-config search path.
Perhaps you should add the directory containing `/var/lib/jenkins/bui.pc'
to the PKG_CONFIG_PATH environment variable
No package '/var/lib/jenkins/bui' found
Failed to open 'ld/rugged/ext/rugged/../../vendor/libgit2/build/libgit2.pc': No such file or directory
No package 'ld/rugged/ext/rugged/../../vendor/libgit2/build/libgit2.pc' found

So it seems like it's a bug in pkg-config but i dont know enough of that tool to know for sure, is it being used correctly? Could someone help file a bug report there?

Ngôn ngữ chính
C
Star
2.3k
Fork
293
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của libgit2/rugged

Tất cả issue của libgit2/rugged

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.