Singular https://www.singular.uni-kl.de/forum/ |
|
Compiling Singular from source https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2411 |
Page 1 of 1 |
Author: | Ken [ Wed May 28, 2014 3:55 pm ] |
Post subject: | Compiling Singular from source |
Hello, for many hours I have been trying to compile Singular 4 on Mac OS X 10.9.3 from source, this is how I tried: 1. clone recent git repository to /Applications/Singular 2. cd /Applications/Singular 2.0 ./autogen.sh 2.1 mkdir BUILD 2.2 cd BUILD 2.3 /Applications/Singular/configure --prefix=/Applications/Singular/BUILD/ 2.3 make 2.4 make check 2.5 make install Everything worked out fine before I tried to link & compile tt.cc from the standalone.test directory. First I read the HOWTO-libsingular because I guess the singular.uni-kl.de/Manual/modules.pdf is quite obsolete. So I switched to /Applications/Singular and executed ./libsingular-config.in --libs and ... --cflags and typed in g++ [output from the first command] -o tt tt.cc [output from the second command] but since the values from entering the two commands already look strange, it did not work out: clang: error: no such file or directory: '@USEPPROCSDYNAMICLD@' clang: error: no such file or directory: '@SINGULAR_CFLAGS@' clang: error: no such file or directory: '@FLINT_CFLAGS@' clang: error: no such file or directory: '@NTL_CFLAGS@' clang: error: no such file or directory: '@GMP_CFLAGS@' Then reading the "obsolete" manual I tried to fix the arguments for g++ in the way the compiler finds its libraries: g++ -I/Applications/Singular -I/Applications/Singular/BUILD/include -I/Applications/Singular/BUILD/include/singular -DSING_NDEBUG -DOM_NDEBUG -o tt tt.cc But then an error message came up like this, I guess it means something is working on 64 bit used to work with 32bit systems...: ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) So far I do not know how to proceed any further... I will be happy for any advice helping me to fix this problem. Best regards. |
Author: | Ken [ Thu May 29, 2014 12:32 am ] |
Post subject: | Re: Compiling Singular from source |
So, I found out it is only about the functions I am going to use... Anyone an idea why it says e.g. Undefined symbols for architecture x86_64: "rDefault(int, int, char**)", referenced from: _main in tt-5ce84d.o ld: symbol(s) not found for architecture x86_64 I am happy about any constructive answer... Code: #include "kernel/mod2.h" // general settings/macros
#include "Singular/ipid.h" // for SModulFunctions, leftv #include "Singular/libsingular.h" #include "misc/auxiliary.h" #include "kernel/structs.h" #include "kernel/polys.h" #include "coeffs/numbers.h" #include "coeffs/longrat.h" #include "kernel/oswrapper/feread.h" #include "polys/monomials/ring.h" #include "omalloc/omalloc.h" #include "polys/clapsing.h" #include "polys/monomials/maps.h" #include "kernel/GBEngine/kutil.h" #include "kernel/GBEngine/kstd1.h" #include "kernel/GBEngine/tgb.h" #include "polys/sparsmat.h" #include "Singular/subexpr.h" #include "Singular/tok.h" #include "Singular/grammar.h" #include "Singular/ipid.h" #include "Singular/ipshell.h" #include "Singular/attrib.h" #include "misc/options.h" int main( int, char *argv[] ) { // construct the ring Z/32003[x,y,z] // the variable names char **n=(char**)omalloc(3*sizeof(char*)); n[0]=omStrDup("x"); n[1]=omStrDup("y"); n[2]=omStrDup("z2"); } |
Author: | Guest [ Thu May 29, 2014 12:34 am ] |
Post subject: | Re: Compiling Singular from source |
Ken wrote: So, I found out it is only about the functions I am going to use... Anyone an idea why it says e.g. Undefined symbols for architecture x86_64: "rDefault(int, int, char**)", referenced from: _main in tt-5ce84d.o ld: symbol(s) not found for architecture x86_64 I am happy about any constructive answer... Code: #include "kernel/mod2.h" // general settings/macros #include "Singular/ipid.h" // for SModulFunctions, leftv #include "Singular/libsingular.h" #include "misc/auxiliary.h" #include "kernel/structs.h" #include "kernel/polys.h" #include "coeffs/numbers.h" #include "coeffs/longrat.h" #include "kernel/oswrapper/feread.h" #include "polys/monomials/ring.h" #include "omalloc/omalloc.h" #include "polys/clapsing.h" #include "polys/monomials/maps.h" #include "kernel/GBEngine/kutil.h" #include "kernel/GBEngine/kstd1.h" #include "kernel/GBEngine/tgb.h" #include "polys/sparsmat.h" #include "Singular/subexpr.h" #include "Singular/tok.h" #include "Singular/grammar.h" #include "Singular/ipid.h" #include "Singular/ipshell.h" #include "Singular/attrib.h" #include "misc/options.h" int main( int, char *argv[] ) { // construct the ring Z/32003[x,y,z] // the variable names char **n=(char**)omalloc(3*sizeof(char*)); n[0]=omStrDup("x"); n[1]=omStrDup("y"); n[2]=omStrDup("z2"); } This is the correct error message regarding the code from above: Code: Undefined symbols for architecture x86_64:
"_omAllocBinFromFullPage", referenced from: _omalloc(unsigned long) in tt-d99eba.o _omStrDup(char const*) in tt-d99eba.o "_omAllocFromSystem", referenced from: _omalloc(unsigned long) in tt-d99eba.o _omStrDup(char const*) in tt-d99eba.o "_om_Size2Bin", referenced from: _omalloc(unsigned long) in tt-d99eba.o _omStrDup(char const*) in tt-d99eba.o ld: symbol(s) not found for architecture x86_64 |
Author: | malex [ Thu May 29, 2014 10:54 pm ] |
Post subject: | Re: Compiling Singular from source |
using ./libsingular-config.in is wrong - reference the installed _PREFIX_PATH_/libsingular-config instead |
Author: | Ken [ Mon Jun 02, 2014 7:02 am ] |
Post subject: | Re: Compiling Singular from source |
Well still, it does not work, I recently opened an issue on Github... |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |