thaines / helit

My machine learning/computer vision library for all of my recent papers, plus algorithms that I just like.
332 stars 149 forks source link

Issues compiling files #16

Open LittleHalfling opened 4 months ago

LittleHalfling commented 4 months ago

Hi! I'm trying to follow the instructions in the READ.ME file for the project and am working on getting the test file 'test_continuous_to_continuous.py' to run, as the steps suggest running test files from helit/frf. I am currently encountering the following error when trying to run setup.py to create frf_c.so: veronica@veronica-virtual-machine:~/helit/frf$ sudo python2 setup.py install [sudo] password for veronica: running install running bdist_egg running egg_info writing frf.egg-info/PKG-INFO writing top-level names to frf.egg-info/top_level.txt writing dependency_links to frf.egg-info/dependency_links.txt reading manifest file 'frf.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'frf.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_py running build_ext There is a workaround to now inherit optimization CFLAGS when compiling wheels. To enable this, set APPLY_LP2002043_UBUNTU_CFLAGS_WORKAROUND in your environment. See LP: https://launchpad.net/bugs/2002043 for further context. APPLY_LP2002043_UBUNTU_CFLAGS_WORKAROUND not detected. building 'frf_c' extension x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c philox.c -o build/temp.linux-x86_64-2.7/philox.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c data_matrix.c -o build/temp.linux-x86_64-2.7/data_matrix.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c summary.c -o build/temp.linux-x86_64-2.7/summary.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c information.c -o build/temp.linux-x86_64-2.7/information.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c learner.c -o build/temp.linux-x86_64-2.7/learner.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c index_set.c -o build/temp.linux-x86_64-2.7/index_set.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c tree.c -o build/temp.linux-x86_64-2.7/tree.o x86_64-linux-gnu-gcc -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c frf_c.c -o build/temp.linux-x86_64-2.7/frf_c.o x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -ffile-prefix-map=/build/python2.7-RH0SVf/python2.7-2.7.18=. -flto=auto -ffat-lto-objects -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fPIC build/temp.linux-x86_64-2.7/philox.o build/temp.linux-x86_64-2.7/data_matrix.o build/temp.linux-x86_64-2.7/summary.o build/temp.linux-x86_64-2.7/information.o build/temp.linux-x86_64-2.7/learner.o build/temp.linux-x86_64-2.7/index_set.o build/temp.linux-x86_64-2.7/tree.o build/temp.linux-x86_64-2.7/frf_c.o -o build/lib.linux-x86_64-2.7/frf_c.so /usr/bin/ld: build/temp.linux-x86_64-2.7/learner.o (symbol from plugin): in function Idiot_new': (.text+0x0): multiple definition ofBiGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/learner.o (symbol from plugin): in function Idiot_new': (.text+0x0): multiple definition ofGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/learner.o (symbol from plugin): in function Idiot_new': (.text+0x0): multiple definition ofCategoricalInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/learner.o (symbol from plugin): in function Idiot_new': (.text+0x0): multiple definition ofNothingInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/index_set.o (symbol from plugin): in function IndexSet_new': (.text+0x0): multiple definition ofOneCatLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/index_set.o (symbol from plugin): in function IndexSet_new': (.text+0x0): multiple definition ofSplitLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/index_set.o (symbol from plugin): in function IndexSet_new': (.text+0x0): multiple definition ofIdiotLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofBiGaussianSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofGaussianSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofCategoricalSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofNothingSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofBiGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofCategoricalInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofNothingInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofOneCatLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofSplitLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/tree.o (symbol from plugin): in function PtrArray_new': (.text+0x0): multiple definition ofIdiotLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofOneCatLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofSplitLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofIdiotLearner'; build/temp.linux-x86_64-2.7/learner.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofBiGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofGaussianInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofCategoricalInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofNothingInfo'; build/temp.linux-x86_64-2.7/information.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofBiGaussianSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofGaussianSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofCategoricalSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here /usr/bin/ld: build/temp.linux-x86_64-2.7/frf_c.o (symbol from plugin): in function CallbackReport': (.text+0x0): multiple definition ofNothingSummary'; build/temp.linux-x86_64-2.7/summary.o (symbol from plugin):(.text+0x0): first defined here collect2: error: ld returned 1 exit status error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Do other header/source files in different directories need to be compiled to resolve this issue? What can I do to run the program?

LittleHalfling commented 3 months ago

@thaines Would you be able to help troubleshoot the setup process? In this particular instance, the test file is not running due to a multiple symbol definitions error.

thaines commented 3 months ago

Sorry for the slow reply, though this code is very old now, and effectively here for reference, nothing more. I actually haven't a clue how to fix this problem: it's clearly some kind of code rot, where the libraries used have changed and that's causing the symbol clash, presumably because I'm doing something in a way that is now depreciated or was never meant to work in the first place. I'm afraid that this is unlikely to compile within a modern environment as Python 2 is now end of life, scipy.weave is effectively dead, and many of the libraries have moved on, to the point of being very different indeed. If I wanted to get this running now I'ld be looking into finding a virtual machine running something like Ubuntu 16.04 and doing so within that. To actually fix it to run on a modern computer, while doable, is going to be at least a weeks worth of incredibly fiddly fixes (including conversion to Python3), probably a months, and that's assuming I do it and can remember this code well enough for that to help (a big assumption).

LittleHalfling commented 3 months ago

@thaines That would make sense. I was successful at running the test files in Ubuntu 15, as I was originally running off the latest version of it. This is a good sign. However, I am now facing the issue of being unable to pip install weave in order to run main.py in /let due to weave being deprecated. I know rewriting this code for Python 3 would take an immense amount of work, but is there any way to install weave in Python 2.7?

LittleHalfling commented 3 months ago

@thaines Okay, so after a LOT of tinkering in Ubuntu 15's terminal and downloading a version of scipy-weave that could run weave, I managed to get the program to open. If you're able to recall how your program is used, the only issue I'm facing at this point is I don't seem to be tagging the text correctly, as I'm unable to generate any more than 1 letter at a time. If you have any tips on getting hst to generate full words, I'd appreciate it. Thanks for giving me the idea to try an older version of Ubuntu!