Read-only forum archive

can't compile correctly under x86_64

can't compile correctly under x86_64

magichowl · Wed Mar 21, 2012 11:46 am

Hi,

I got a variant of SIngular from github, and I compiled it successfully under 32bit platform, ubuntu system (just a warning about to install with singular.share package). The Singular and ESingular files are in the directory "i386-Linux" of the unziped directory.

But when I compile it under the x86-64 platform, "make install" occur errors :

Quote:
fereadl.c:(.text+0x41d): undefined reference to `tgoto'
fereadl.c:(.text+0x42d): undefined reference to `tputs'
/home/magichowl/programs/ederc-Sources-1c2548f/kernel/libkernel.a(fereadl.o): In function `fe_init':
fereadl.c:(.text+0x748): undefined reference to `tgetent'
fereadl.c:(.text+0x788): undefined reference to `tgetstr'
fereadl.c:(.text+0x7a6): undefined reference to `PC'
fereadl.c:(.text+0x7ab): undefined reference to `tgetstr'
fereadl.c:(.text+0x7be): undefined reference to `BC'
fereadl.c:(.text+0x7c5): undefined reference to `tgetstr'
fereadl.c:(.text+0x7d3): undefined reference to `UP'
fereadl.c:(.text+0x7da): undefined reference to `tgetnum'
fereadl.c:(.text+0x7ec): undefined reference to `tgetnum'
fereadl.c:(.text+0x80c): undefined reference to `tgetstr'
/home/magichowl/programs/ederc-Sources-1c2548f/kernel/libkernel.a(fereadl.o): In function `fe_fgets_stdin_fe':
fereadl.c:(.text+0xf54): undefined reference to `tgetstr'
fereadl.c:(.text+0xf65): undefined reference to `tputs'
collect2: ld return 1
make[1]: *** [Singular] error 1
make[1]: leaving directory `/home/magichowl/programs/ederc-Sources-1c2548f/Singular'
make: *** [install] error 1


And there are no Singular or ESingular executable files in "x86_64-Linux" directory.
I've tried to "make install_all" in the directory "omalloc"
How to solve it?

Re: can't compile correctly under x86_64

hannes · Thu Mar 22, 2012 4:21 pm

You probably have not libreadline (or it is incomplete).
The alternative to the prefered readline has a bug,
which can be easily fixed:
change kernel/febase.h, line 60
from
Code:
#ifdef ix86_Linux
#undef HAVE_FEREAD

to
Code:
#if defined(ix86_Linux) || defined(x86_64_Linux)
#undef HAVE_FEREAD

Readline

bschnitz · Fri Mar 23, 2012 8:07 pm

This puzzled me a bit at first. When I switched to the latest version of the singular master branch, I found readline to be deactivated. As it seems, I do not have the readline haeders/libraries installed on this system (and I'm not the admin, so I can't install them). So the emulated readline was very convenient for me. Undoing the change from above fixed it for me. Seemingly this bug does only occeur on some systems? Hope this helps all those, who are missing the readline features, too.

Re: can't compile correctly under x86_64

magichowl · Tue Mar 27, 2012 2:28 pm

the error continues, no matter I install Gnu Readline library, or I change the code.

And the error message is the same.

Re: can't compile correctly under x86_64

bschnitz_nologin · Thu Mar 29, 2012 9:07 am

Maybe curses is not installed correctly? Or maybe you did not "make clear" before recompiling?

Re: can't compile correctly under x86_64

magichowl · Fri Mar 30, 2012 2:56 am

After install libncurses5-dev,
and make clean

Ive compiled correctly.

Thank you all!