Re: [gambit-list] Compile scheme to executable code...
James Long wrote:
You shouldn't need those extra libraries. Make sure you have compiled Gambit as c++ code (some option in configure). Thank you again, I didn't know that gambit could be compile with g++...! But, as I try to compile it with g++, I get an error at compilation. I'm now compiling the version 4 beta 22. I tried to compile gambit version 4 beta 20 and it worked fine... Here is what the error I got:
$ ./configure --prefix=/opt/g4 --enable-cplusplus $ make making all in include make[1]: Entering directory `/home/dave/apps-src/gambc-4.0b22/include' make[1]: Leaving directory `/home/dave/apps-src/gambc-4.0b22/include' making all in lib make[1]: Entering directory `/home/dave/apps-src/gambc-4.0b22/lib' g++ -I../include -I. -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr -fpeephole2 -falign-jumps -falign-functions -fno-function-cse -ftree-copyrename -ftree-fre -ftree-dce -fregmove -fgcse-las -freorder-functions -fcaller-saves -fno-if-conversion2 -foptimize-sibling-calls -fcse-skip-blocks -funit-at-a-time -finline-functions -fomit-frame-pointer -fPIC -fno-common -mieee-fp -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/opt/g4/4.0b22\" -c _io.c g++ -I../include -I. -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr -fpeephole2 -falign-jumps -falign-functions -fno-function-cse -ftree-copyrename -ftree-fre -ftree-dce -fregmove -fgcse-las -freorder-functions -fcaller-saves -fno-if-conversion2 -foptimize-sibling-calls -fcse-skip-blocks -funit-at-a-time -finline-functions -fomit-frame-pointer -fPIC -fno-common -mieee-fp -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/opt/g4/4.0b22\" -c _num.c g++ -I../include -I. -Wall -W -Wno-unused -O1 -fno-math-errno -fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv -fexpensive-optimizations -fforce-addr -fpeephole2 -falign-jumps -falign-functions -fno-function-cse -ftree-copyrename -ftree-fre -ftree-dce -fregmove -fgcse-las -freorder-functions -fcaller-saves -fno-if-conversion2 -foptimize-sibling-calls -fcse-skip-blocks -funit-at-a-time -finline-functions -fomit-frame-pointer -fPIC -fno-common -mieee-fp -DHAVE_CONFIG_H -D___PRIMAL -D___LIBRARY -D___GAMBCDIR=\"/opt/g4/4.0b22\" -c _std.c os.h:537: error: previous declaration of ‘char** environ’ with ‘C++’ linkage /usr/include/unistd.h:496: error: conflicts with new declaration with ‘C’ linkage make[1]: *** [_std.o] Error 1 make[1]: Leaving directory `/home/dave/apps-src/gambc-4.0b22/lib' make: *** [all-recursive] Error 1 I would prefer to install gambit 4 beta 22 instead of beta 20 (to be able to use snowfort), am I the only one which this problem occured? Thank you very again for your help! David St-Hilaire
Afficher les réponses par date
-D___GAMBCDIR=\"/opt/g4/4.0b22\" -c _std.c os.h:537: error: previous declaration of ‘char** environ’ with ‘C++’ linkage /usr/include/unistd.h:496: error: conflicts with new declaration with ‘C’ linkage make[1]: *** [_std.o] Error 1
I suggested that David dirtily comments the line (537) in OS.h that does #ifdef USE_environ extern char **environ; #endif for it is a bad idea to modify unistd.h (that declares that same variable line 475 under the __USE_GNU #ifdef statement). Looks like it compiled well. If this inserted a big bug somewhere, I am sure he'll be happy to ask you for another solution :) Adrien -- "I am not a Church numeral; I am a free variable!" (The Scheme Underground)
participants (2)
-
Adrien Pierard -
David St-Hilaire