Borda / pyGCO

A python wrapper for gco-v3.0 package, used for graph cuts based MRF optimization.
http://vision.csd.uwo.ca/code
61 stars 18 forks source link

cannot find -lcgco: No such file or directory #25

Closed T0nyWei closed 1 year ago

T0nyWei commented 1 year ago

Hi! I was trying to compile the wrappers of your library. Other parts in the Makefile worked fine, but when I tried to run make test_wrapper I got the following error message.

g++ -Igco_source -Igco -L. test_wrapper.cpp \
    -o test_wrapper -Wl,-rpath,. -lcgco
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcgco: No such file or directory
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:61: test_wrapper] Error 1

I'm sorry that I am new to compiling wrappers and any help would be greatly appreciated! Thanks in advance!

Borda commented 1 year ago

Hi, @T0nyWei have you run the whole sequence of commands? Also, why not install the package from PyPI? https://pypi.org/project/gco-wrapper/

T0nyWei commented 1 year ago

Hello, @Borda thanks for the reply! I found that the download link in the Makefile was not the latest, but I've managed to download the codes and extracted them to gco_source. However, make all and make test_wrapper were giving me the same error message. Besides, I've installed the package from PyPI and was able to do import gco in python files. However, the test_examples.py is still giving error messages saying no modules named pygco and cgco. Is that normal and could I use the gco package directly? Thanks again!

Borda commented 1 year ago

can you pls share what URL have you used for downloading the code?

T0nyWei commented 1 year ago

For the gco-v3.0 I downloaded from https://vision.cs.uwaterloo.ca/files/gco-v3.0.zip. BTW I just tried to run the make commands without downloading and replacing the codes and it completed with no errors but just some warning messages. Perhaps it was caused by the fact that there were some updates to the GCO source codes? Thank you again for the reply!

Borda commented 1 year ago

Yes, sounds like that, as they provide it as an archive only without any change history, and the version was not bumped (this python wrapper was built for 3.0, and they share theirs as 3.0 too) @T0nyWei, would you be interested in checking with the authors what the changes were and how much important they were, like if they fixed some bugs or if it was just a cosmetical update...?

T0nyWei commented 1 year ago

I'd like to but I'm afraid that my knowledge in this area is not adequate... :( My major is not in this direction and I am just trying to finish one of my class assignments. I'm also not familiar with the authors. Sorry that I cannot help and great thanks again for your effort and help!

1022WANG commented 1 year ago

I have the same problem. Have you fixed them?

Borda commented 1 year ago

hi, could you pls try to install from source:


pip install https://github.com/Borda/pyGCO/archive/refs/heads/master.zip
Borda commented 1 year ago

Closing as it works for me and missing reproducible example... :flamingo: feel free to reopen if need :)