Error while building Sage 7.1

157 views
Skip to first unread message

cozzy

unread,
Apr 1, 2016, 8:24:06 PM4/1/16
to sage-devel
Hi I've encountered this error while building Sage from sources obtained from git -clone. I'm running Manjaro Linux 4.3.3-3-ARCH. Any ideas? 

Thanks
John

/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::push_back(char)@GLIBCXX_3.4.21'
/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21'
/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace_aux(unsigned long, unsigned long, unsigned long, char)@GLIBCXX_3.4.21'
/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::append(char const*)@GLIBCXX_3.4.21'
/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_mutate(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
/lib/../lib64/libqd.so: undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_replace(unsigned long, unsigned long, char const*, unsigned long)@GLIBCXX_3.4.21'
collect2: error: ld returned 1 exit status
Makefile:599: recipe for target 'fplll' failed
make[6]: *** [fplll] Error 1
make[6]: Leaving directory '/home/cozzy/dev/sage/local/var/tmp/sage/build/libfplll-20160107/src/src'
Makefile:450: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/cozzy/dev/sage/local/var/tmp/sage/build/libfplll-20160107/src/src'
Makefile:392: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/cozzy/dev/sage/local/var/tmp/sage/build/libfplll-20160107/src'
Makefile:323: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/cozzy/dev/sage/local/var/tmp/sage/build/libfplll-20160107/src'
Error building libfplll

real 0m37.989s
user 0m30.720s
sys 0m1.973s
************************************************************************
Error installing package libfplll-20160107

Volker Braun

unread,
Apr 2, 2016, 4:52:52 AM4/2/16
to sage-devel
can you post the entire log?

cozzy

unread,
Apr 2, 2016, 7:56:23 PM4/2/16
to sage-devel
Sure. File libfplll-20160107.log is in the attachment.


libfplll-20160107.log

Volker Braun

unread,
Apr 3, 2016, 4:42:58 AM4/3/16
to sage-devel
Pretty clear that its a dual abi issue, libfplll discovers your system libqd and decides to link against it. But your system is new enough to use the new cxx11 abi, whereas the Sage-built gcc is not. Hence linking fails with undefined std::__cxx11 symbols, as expected.

This is probably going to become a big issue for us soon when more distros switch to the new cxx11 abi. I've opened 


A workaround for now would be to uninstall your libqd-devel package while compiling libfplll, or prevent Sage from building its own gcc (you probably don't have gfortran installed)



Dima Pasechnik

unread,
Apr 3, 2016, 10:45:19 AM4/3/16
to sage-devel
IMHO the pre-reqs needed to build Sage on Linux ought to include gfortran and g++ (why not? listing them won't harm, even if the gcc version is blacklisted)

This is becoming an issue - there was a post recently about a failure to build Sage on a newish Linux system, with error in building Sage's gcc using a new gcc 5.

cozzy

unread,
Apr 3, 2016, 11:39:55 AM4/3/16
to sage-devel
Thanks, removing the qd package indeed helped to build SageMath. Is it safe now to install the qd back to the system?

Erik Bray

unread,
Apr 3, 2016, 3:30:41 PM4/3/16
to sage-...@googlegroups.com
On Sun, Apr 3, 2016 at 4:45 PM, Dima Pasechnik <dim...@gmail.com> wrote:
> IMHO the pre-reqs needed to build Sage on Linux ought to include gfortran
> and g++ (why not? listing them won't harm, even if the gcc version is
> blacklisted)
>
> This is becoming an issue - there was a post recently about a failure to
> build Sage on a newish Linux system, with error in building Sage's gcc using
> a new gcc 5.

On the contrary, I believe requiring someone to build an entirely
separate compiler toolchain is more burdensome and both user- and
developer-hostile compared to fixing the issue with that compiler
(where possible; I recognize it is not always).

Erik

> On Sunday, April 3, 2016 at 9:42:58 AM UTC+1, Volker Braun wrote:
>>
>> Pretty clear that its a dual abi issue, libfplll discovers your system
>> libqd and decides to link against it. But your system is new enough to use
>> the new cxx11 abi, whereas the Sage-built gcc is not. Hence linking fails
>> with undefined std::__cxx11 symbols, as expected.
>>
>> This is probably going to become a big issue for us soon when more distros
>> switch to the new cxx11 abi. I've opened
>>
>> http://trac.sagemath.org/ticket/20350
>>
>> A workaround for now would be to uninstall your libqd-devel package while
>> compiling libfplll, or prevent Sage from building its own gcc (you probably
>> don't have gfortran installed)
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+...@googlegroups.com.
> To post to this group, send email to sage-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

Dima Pasechnik

unread,
Apr 3, 2016, 4:32:53 PM4/3/16
to sage-devel


On Sunday, April 3, 2016 at 8:30:41 PM UTC+1, Erik Bray wrote:
On Sun, Apr 3, 2016 at 4:45 PM, Dima Pasechnik <dim...@gmail.com> wrote:
> IMHO the pre-reqs needed to build Sage on Linux ought to include gfortran
> and g++ (why not? listing them won't harm, even if the gcc version is
> blacklisted)
>
> This is becoming an issue - there was a post recently about a failure to
> build Sage on a newish Linux system, with error in building Sage's gcc using
> a new gcc 5.

On the contrary, I believe requiring someone to build an entirely
separate compiler toolchain is more burdensome and both user- and
developer-hostile compared to fixing the issue with that compiler
(where possible; I recognize it is not always).

Well, that's what I meant - our documentation does not spell out details on when 
one can use the system's default toolchain, and what are the requirements for this.

What happens is that sometimes people just did not install system's gfortran and g++,
whereas gcc itself is OK, and this results in Sage building its own toolchain, while
this could be avoided by installing gfortran and g++.

Dima

Volker Braun

unread,
Apr 3, 2016, 4:47:37 PM4/3/16
to sage-devel
On Sunday, April 3, 2016 at 9:30:41 PM UTC+2, Erik Bray wrote:
On the contrary, I believe requiring someone to build an entirely
separate compiler toolchain is more burdensome and both user- and
developer-hostile compared to fixing the issue with that compiler

I.e. getting some older linux distro to upgrade their compiler is less burdensome? And it is easier to convince Apple to provide a working fortran compiler for OSX? Let me know when you are finished with that ;-)


Dima Pasechnik

unread,
Apr 3, 2016, 6:25:22 PM4/3/16
to sage-devel
Intel sells Fortran compilers for OSX, just under 900$US per single user install :-)

Erik Bray

unread,
Apr 3, 2016, 6:26:04 PM4/3/16
to sage-...@googlegroups.com
You conveniently snipped off the part where I acknowledged that :)

Erik Bray

unread,
Apr 3, 2016, 6:29:11 PM4/3/16
to sage-...@googlegroups.com
On Sun, Apr 3, 2016 at 10:32 PM, Dima Pasechnik <dim...@gmail.com> wrote:
>
>
> On Sunday, April 3, 2016 at 8:30:41 PM UTC+1, Erik Bray wrote:
>>
>> On Sun, Apr 3, 2016 at 4:45 PM, Dima Pasechnik <dim...@gmail.com> wrote:
>> > IMHO the pre-reqs needed to build Sage on Linux ought to include
>> > gfortran
>> > and g++ (why not? listing them won't harm, even if the gcc version is
>> > blacklisted)
>> >
>> > This is becoming an issue - there was a post recently about a failure to
>> > build Sage on a newish Linux system, with error in building Sage's gcc
>> > using
>> > a new gcc 5.
>>
>> On the contrary, I believe requiring someone to build an entirely
>> separate compiler toolchain is more burdensome and both user- and
>> developer-hostile compared to fixing the issue with that compiler
>> (where possible; I recognize it is not always).
>
>
> Well, that's what I meant - our documentation does not spell out details on
> when
> one can use the system's default toolchain, and what are the requirements
> for this.
>
> What happens is that sometimes people just did not install system's gfortran
> and g++,
> whereas gcc itself is OK, and this results in Sage building its own
> toolchain, while
> this could be avoided by installing gfortran and g++.

Ah okay, yes, definitely. For a while when I was building the Docker
images it was compiling gcc for exactly this reason--I did not have
gfortran. In fairness this requirement *is* documented, but it's not
very specific. It's also hard to find in the build log--if possible
at all--any note like "gfortran not found, building gcc". I'd almost
rather the build exit at this point unless I've manually provided some
flag (which of course would be pointed out in an exit message). But
either way.

A table somewhere in the documentation would help track this...?

Samuel Lelievre

unread,
Apr 3, 2016, 7:00:40 PM4/3/16
to sage-devel
Reply all
Reply to author
Forward
0 new messages