Closed strogdon closed 7 years ago
Sort of. I am guessing the gcc you have on prefix is less permissive by default. You have 5.4.0? It works here with 5.3.0 but I should move on to at least 5.4.0. The build indicate that adding -fpermissive to CXXFLAGS should solve that particular problem. Do you think I should add it by default? Considering I am more or less working on getting things compiled with clang that's a new red flag.
Yes I have 5.4.0. Let me try it with -fpermissive
to see if that fixes things.
Adding -fpermissive
to CXXFLAGS allowed it to build. I think I remember a Sage ticket where -fpermissive
had to be added. I think the givaro, fflas-ffpack, linbox
ticket. It's your call as to whether to add it as default. I can always fix it up here. If not fixed then the issue will be here in case a Gentoo user ventures to gcc-5.4.0
.
Unless one knows how to fix
the code?
Fixing the code is upstream problem. I guess I can pass it on. I should check first if they took care of this in master.
"static" keyword introduced here https://github.com/Singular/Sources/commit/c7afbd34f1aae46fbf47925ff2246e5f42f4ca08 I am guessing they forgot to touch the header at the same time.
Yes, fixing the header is what's needed.
And in other news, the ebuild install fine with clang-3.7.1 on Gentoo. Let's see what upstream make of it.
There must be something else helping to trigger this (it still needs to be fixed I think). singular just build without so much as a warning for me in Gentoo with gcc-5.4.0. The only difference is in CXXFLAGS where I adopt a non-debug profile for singular (since building a debugging version of singular is more complicated than that). So I have -O2 -march=native
instead of -O0 -g -ggdb
.
I have the same failure without the debugging profile
/storage/strogdon/gentoo-rap/bin/bash ./libtool --tag=CXX --mode=compile x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -I/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/singular-4.0.3_p3/work/singular-4.0.3 -I/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/singular-4.0.3_p3/work/singular-4.0.3 -DSING_NDEBUG -DOM_NDEBUG -march=native -O2 -pipe -fPIC -fno-common -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks -c -o cfGcdAlgExt.lo cfGcdAlgExt.cc
libtool: compile: x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I./include -I./include -I. -I/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/singular-4.0.3_p3/work/singular-4.0.3 -I/storage/strogdon/gentoo-rap/var/tmp/portage/sci-mathematics/singular-4.0.3_p3/work/singular-4.0.3 -DSING_NDEBUG -DOM_NDEBUG -march=native -O2 -pipe -fPIC -fno-common -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks -c cfGcdAlgExt.cc -fPIC -DPIC -o .libs/cfGcdAlgExt.o
cfGcdAlgExt.cc: In function ‘void tryExtgcd(const CanonicalForm&, const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm&, CanonicalForm&, bool&)’:
cfGcdAlgExt.cc:955:173: error: ‘void tryExtgcd(const CanonicalForm&, const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm&, CanonicalForm&, bool&)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
static void tryExtgcd( const CanonicalForm & F, const CanonicalForm & G, const CanonicalForm & M, CanonicalForm & result, CanonicalForm & s, CanonicalForm & t, bool & fail )
^
In file included from cfGcdAlgExt.cc:27:0:
cfGcdAlgExt.h:29:6: note: previous declaration of ‘void tryExtgcd(const CanonicalForm&, const CanonicalForm&, const CanonicalForm&, CanonicalForm&, CanonicalForm&, CanonicalForm&, bool&)’
void tryExtgcd( const CanonicalForm & F, const CanonicalForm & G, const CanonicalForm& M, CanonicalForm & result, CanonicalForm & s, CanonicalForm & t, bool & fail );
^
make[4]: *** [Makefile:1205: cfGcdAlgExt.lo] Error 1
Now of course my gcc was built using the debugging profile.
I reverted to gcc-4.9.3
in my prefix and the failure is still there. Perhaps it is due to how my gcc was built. 4.9.3
was also built with debugging turned on.
Possible I have checked and my own gcc
was build without debugging.
Hmm. Rebuilt gcc-5.4.0
without debugging and I still get the failure when building singular. No debugging in singular either. I think there is definitely a syntax problem in singular but I don't see why there's a problem only in prefix?
I just noticed that I have singular-4.0.3_p4
installed and there were no build issues. singular-4.0.3_p5
also builds without issue. It's not clear to me what has changed. The factory/cfGcdAlgExt.h
header is unchanged. singular-4.0.3_p3
still fails. There must be something very subtle.
Must be. 4.1.0 is coming and hopefully, without any issues.
Is this still a problem?
I now have singular-4.1.0_p1-r1
from the overlay installed and 4.1.0_p2
builds without issue. So I would say this is safe to close.
So I have the following
This was with
MAKEOPTS=-j1
to rule out parallel building. Builds fine on Gentoo. Is there a syntax problem?