Questions and Answers :
Unix/Linux :
Problem compling S@H in Debian Linux
Message board moderation
Author | Message |
---|---|
HCN Send message Joined: 5 Jan 00 Posts: 5 Credit: 621,590 RAC: 0 |
I have downloaded the S@H source (2004-11-20) and tried to compile it in Debian Linux (kernel 2.6.8) with both gcc 3.3.4 and 3.4.2, but they were both unsuccessful. gcc-3.4.2 gives the following error: (cd client; make all) make[1]: Entering directory `/usr/src/seti_boinc/client' g++-3.4 -O3 -march=pentium3 -I/usr/X11R6/include -DHAVE_CONFIG_H -DTEXT_UI -DNDEBUG -DCLIENT -pthread -I/usr/src/boinc/api -I/usr/src/boinc/lib -I/usr/src/boinc/image_libs/ -I.. -I../db -c -o main.o main.cpp In file included from /usr/include/c++/3.4/bits/stl_algobase.h:67, from /usr/include/c++/3.4/bits/char_traits.h:46, from /usr/include/c++/3.4/string:47, from /usr/src/boinc/lib/diagnostics.h:20, from main.cpp:43: /usr/include/c++/3.4/cstdlib:103: error: `::malloc' has not been declared /usr/include/c++/3.4/cstdlib:111: error: `::realloc' has not been declared In file included from ../db/db_table.h:27, from seti_header.h:33, from s_util.h:103, from main.cpp:45: ../db/sqlint8.h: In function `sqlint8_t atoll(const char*)': ../db/sqlint8.h:113: error: redefinition of `sqlint8_t atoll(const char*)' /usr/include/stdlib.h:396: error: `long long int atoll(const char*)' previously defined here make[1]: *** [main.o] Error 1 make[1]: Leaving directory `/usr/src/seti_boinc/client' make: *** [all] Error 2 Also, in client/Makefile, it always include "-I/usr/bin/X11/xlsfonts/include" which does not exist. I guess ./configure probably wants "-I/usr/X11R6/include" instead and I have to change it everytime. Finally, it sometimes asks me for "GL/glut.h". Where can I find it? Can anyone help me to fix the problem? Thanks a lot! |
Ned Slider Send message Joined: 12 Oct 01 Posts: 668 Credit: 4,375,315 RAC: 0 |
See the guide in my signiture for detailed instructions how to do this :) Ned *** My Guide to Compiling Optimised BOINC and SETI Clients *** *** Download Optimised BOINC and SETI Clients for Linux Here *** |
HCN Send message Joined: 5 Jan 00 Posts: 5 Credit: 621,590 RAC: 0 |
> See the guide in my signiture for detailed instructions how to do this :) Thank you very much for your guide. That's exactly what I have followed. BOINC can be successfully compiled, but not for SETI. Several things are particularly puzzling ... 1. Why it keeps complaining about malloc and realloc? 2. Is the wrong include path caused by malfunctioing ./configure? 3. Where can I find GL/glut.h for Debian? And actually is it a must? Is it required by the graphics? If yes, how can I disable it? FYI, it asked me for GL/glu.h as well, but I managed to find the debian package for it. Just discovered something as well. Hope it helps: In ./configure, the output includes these: checking for xlsfonts... (cached) /usr/bin/X11/xlsfonts checking for stdlib.h... (cached) yes checking for GNU libc compatible malloc... no checking for stdlib.h... (cached) yes checking for GNU libc compatible realloc... no After ./configure and then editing the wrong include path, the first "make" gives: (cd client; make all) make[1]: Entering directory `/usr/src/seti_boinc/client' g++-3.4 -O3 -march=pentium3 -I/usr/X11R6/include -DHAVE_CONFIG_H -DTEXT_UI -DNDEBUG -DCLIENT -pthread -I.. -I../db -I/usr/src/boinc/api -I/usr/src/boinc/lib -I/usr/src/boinc/image_libs/ -M *.cpp > dependencies In file included from sah_gfx_base.cpp:42: /usr/src/boinc/api/boinc_gl.h:57:22: GL/glut.h: No such file or directory make[1]: *** [dependencies] Error 1 make[1]: Leaving directory `/usr/src/seti_boinc/client' make: *** [all] Error 2 And the second "make" gives the message mentioned in the question. Please help! Thanks! |
Ned Slider Send message Joined: 12 Oct 01 Posts: 668 Credit: 4,375,315 RAC: 0 |
Did you rename the boinc source directory from /boinc_public to /boinc? Do you have a source dirctory structure that looks like this, because it should: /usr/src/boinc /usr/src/seti_boinc Did you then compile boinc first with the following: cd /boinc export MYSQL_CONFIG=true export CFLAGS="-march=pentium3 -O3" export CXXFLAGS=$CFLAGS ./configure make -k Did you then compile the seti client with the following: cd /seti_boinc ./configure make -k All of the above steps are absolutely required and the procedure must be followed exactly for it to work. If this procedure doesn't work when followed exactly, then I can only assume your problems are specific to your linux distro/version of gcc. I can't really be of any more help than that - sorry Ned *** My Guide to Compiling Optimised BOINC and SETI Clients *** *** Download Optimised BOINC and SETI Clients for Linux Here *** |
HCN Send message Joined: 5 Jan 00 Posts: 5 Credit: 621,590 RAC: 0 |
> All of the above steps are absolutely required and the procedure must be > followed exactly for it to work. If this procedure doesn't work when followed > exactly, then I can only assume your problems are specific to your linux > distro/version of gcc. I can't really be of any more help than that - sorry Thanks so much Ned! I have followed exactly what you have written, but there are still errors. However, I have found the problem! Remember that there is a bug in ./configure that causes the wrong include path "-I/usr/bin/X11/xlsfonts/include"? It doesn't only give that wrong include path, but it also breaks subsequent instructions of itself and generates a wrong Makefile. When I renamed "/usr/bin/X11/xlsfonts" to something else, the configuration was executed successfully and the compilation was done! I hope this pices of information can help other people facing this problem. Attention from SETI developers is appreciated. Should I submit a bug report? Haha! Thanks again Ned! |
Ned Slider Send message Joined: 12 Oct 01 Posts: 668 Credit: 4,375,315 RAC: 0 |
Glad you got it working HCN. Everything compiled fine on my Fedora installation, so presumably you have this dir located elsewhere. On my system, it's present as a link pointing to the actual location so presumably it's easier to just create the link than to edit the makefile. Ned *** My Guide to Compiling Optimised BOINC and SETI Clients *** *** Download Optimised BOINC and SETI Clients for Linux Here *** |
Raithmir Send message Joined: 3 Apr 99 Posts: 89 Credit: 385,065 RAC: 0 |
I also discovered the need to rename /usr/bin/X11/xlsfonts to something else before running ./configure. The warnings about glut.h can be resolved by installing the freeglut3 and freeglut3-dev packages (apt-get install freeglut3 freeglut3-dev). http://www.kulthea.net/boinc/ Raithmir's SPARC64/UltraSPARC Linux Builds http://www.kulthea.net/boinc/ |
©2024 University of California
SETI@home and Astropulse are funded by grants from the National Science Foundation, NASA, and donations from SETI@home volunteers. AstroPulse is funded in part by the NSF through grant AST-0307956.