Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage-5.2-r2 failed to build with gcc-4.7.1 #162

Closed
zasdfgbnm opened this issue Aug 20, 2012 · 14 comments
Closed

sage-5.2-r2 failed to build with gcc-4.7.1 #162

zasdfgbnm opened this issue Aug 20, 2012 · 14 comments

Comments

@zasdfgbnm
Copy link
Contributor

x86_64-pc-linux-gnu-g++ -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/number_field/number_field_element_quadratic.cpp -o build/temp.linux-x86_64-2.7/sage/rings/number_field/number_field_element_quadratic.o
In file included from /usr/include/givaro/givpoly1factor.h:176:0,
                 from /usr/include/givaro/givgfq.h:23,
                 from sage/rings/finite_rings/element_givaro.cpp:279:
/usr/include/givaro/givpoly1proot.inl: In instantiation of ‘Poly1FactorDom::Rep& Poly1FactorDom::give_prim_root(Poly1FactorDom::Rep&, const Rep&) const [with Domain = GFqDom; Tag = Dense; RandIter = GivRandom; Poly1FactorDom::Rep = givvector >]’:
/usr/include/givaro/givgfq.inl:1052:3:   required from ‘GFqDom::GFqDom(GFqDom::UTT, GFqDom::UTT, const std::vector::unsigned_type>&) [with TT = int; GFqDom::UTT = unsigned int; typename Signed_Trait::unsigned_type = unsigned int]’
sage/rings/finite_rings/element_givaro.cpp:3721:84:   required from here
/usr/include/givaro/givpoly1proot.inl:294:15: error: ‘degree’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/givaro/givpoly1proot.inl:294:15: note: declarations in dependent base ‘Poly1Dom, Dense>’ are not found by unqualified lookup
/usr/include/givaro/givpoly1proot.inl:294:15: note: use ‘this->degree’ instead
/usr/include/givaro/givpoly1proot.inl:301:9: error: ‘init’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/givaro/givpoly1proot.inl:301:9: note: declarations in dependent base ‘Poly1Dom, Dense>’ are not found by unqualified lookup
/usr/include/givaro/givpoly1proot.inl:301:9: note: use ‘this->init’ instead
/usr/include/givaro/givpoly1proot.inl:311:9: error: ‘init’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
/usr/include/givaro/givpoly1proot.inl:311:9: note: declarations in dependent base ‘Poly1Dom, Dense>’ are not found by unqualified lookup
/usr/include/givaro/givpoly1proot.inl:311:9: note: use ‘this->init’ instead
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/number_field/number_field_morphisms.c -o build/temp.linux-x86_64-2.7/sage/rings/number_field/number_field_morphisms.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/number_field/number_field_morphisms.o -L/usr//lib -L/usr/lib64 -lcsage -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/number_field/number_field_morphisms.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/number_field/totallyreal.c -o build/temp.linux-x86_64-2.7/sage/rings/number_field/totallyreal.o
x86_64-pc-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/finite_rings/element_ntl_gf2e.o -L/usr//lib -L/usr/lib64 -lcsage -lntl -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/finite_rings/element_ntl_gf2e.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/number_field/totallyreal_data.c -o build/temp.linux-x86_64-2.7/sage/rings/number_field/totallyreal_data.o
x86_64-pc-linux-gnu-g++ -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/number_field/number_field_element_quadratic.o -L/usr//lib -L/usr/lib64 -lcsage -lntl -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/number_field/number_field_element_quadratic.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/local_generic_element.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/local_generic_element.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/padics/local_generic_element.o -L/usr//lib -L/usr/lib64 -lcsage -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/padics/local_generic_element.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_base_coercion.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_base_coercion.o
In file included from sage/rings/padics/padic_base_coercion.c:285:0:
/usr/include/csage/gmp_globals.h:6:0: warning: "EXTERN" redefined [enabled by default]
In file included from sage/rings/padics/padic_base_coercion.c:282:0:
/usr/include/csage/ntl_wrap.h:34:0: note: this is the location of the previous definition
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/number_field/totallyreal.o -L/usr//lib -L/usr/lib64 -lcsage -lpari -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/number_field/totallyreal.so
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/number_field/totallyreal_data.o -L/usr//lib -L/usr/lib64 -lcsage -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/number_field/totallyreal_data.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_base_generic_element.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_base_generic_element.o
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_capped_absolute_element.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_capped_absolute_element.o
In file included from sage/rings/padics/padic_capped_absolute_element.c:285:0:
/usr/include/csage/gmp_globals.h:6:0: warning: "EXTERN" redefined [enabled by default]
In file included from sage/rings/padics/padic_capped_absolute_element.c:282:0:
/usr/include/csage/ntl_wrap.h:34:0: note: this is the location of the previous definition
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/padics/padic_base_generic_element.o -L/usr//lib -L/usr/lib64 -lcsage -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/padics/padic_base_generic_element.so
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_capped_relative_element.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_capped_relative_element.o
In file included from sage/rings/padics/padic_capped_relative_element.c:289:0:
/usr/include/csage/gmp_globals.h:6:0: warning: "EXTERN" redefined [enabled by default]
In file included from sage/rings/padics/padic_capped_relative_element.c:282:0:
/usr/include/csage/ntl_wrap.h:34:0: note: this is the location of the previous definition
sage/rings/padics/padic_capped_relative_element.c: In function ‘__pyx_f_4sage_5rings_6padics_29padic_capped_relative_element_26pAdicCappedRelativeElement__set_from_mpz_both’:
sage/rings/padics/padic_capped_relative_element.c:6458:221: warning: passing argument 2 of ‘__gmpz_cmp’ from incompatible pointer type [enabled by default]
In file included from sage/rings/padics/padic_capped_relative_element.c:280:0:
/usr/include/gmp.h:755:20: note: expected ‘mpz_srcptr’ but argument is of type ‘struct __mpz_struct (*)[1]’
sage/rings/padics/padic_capped_relative_element.c: In function ‘__pyx_f_4sage_5rings_6padics_29padic_capped_relative_element_26pAdicCappedRelativeElement__set_mpz_into’:
sage/rings/padics/padic_capped_relative_element.c:8148:218: warning: passing argument 3 of ‘__gmpz_mul’ from incompatible pointer type [enabled by default]
In file included from sage/rings/padics/padic_capped_relative_element.c:280:0:
/usr/include/gmp.h:988:21: note: expected ‘mpz_srcptr’ but argument is of type ‘struct __mpz_struct (*)[1]’
sage/rings/padics/padic_capped_relative_element.c: In function ‘__pyx_f_4sage_5rings_6padics_29padic_capped_relative_element_26pAdicCappedRelativeElement__set_mpq_into’:
sage/rings/padics/padic_capped_relative_element.c:8227:214: warning: passing argument 2 of ‘__gmpz_set’ from incompatible pointer type [enabled by default]
In file included from sage/rings/padics/padic_capped_relative_element.c:280:0:
/usr/include/gmp.h:1073:21: note: expected ‘mpz_srcptr’ but argument is of type ‘struct __mpz_struct (*)[1]’
sage/rings/padics/padic_capped_relative_element.c:8288:242: warning: passing argument 3 of ‘__gmpz_mul’ from incompatible pointer type [enabled by default]
In file included from sage/rings/padics/padic_capped_relative_element.c:280:0:
/usr/include/gmp.h:988:21: note: expected ‘mpz_srcptr’ but argument is of type ‘struct __mpz_struct (*)[1]’
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/padics/padic_base_coercion.o -L/usr//lib -L/usr/lib64 -lcsage -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/padics/padic_base_coercion.so
x86_64-pc-linux-gnu-g++ -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_ext_element.cpp -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_ext_element.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -Os -pipe -march=native -mtune=native -fno-strict-aliasing build/temp.linux-x86_64-2.7/sage/rings/finite_rings/integer_mod.o -L/usr//lib -L/usr/lib64 -lcsage -lgmp -lstdc++ -lntl -lpari -lgmp -lpython2.7 -o build/lib.linux-x86_64-2.7/sage/rings/finite_rings/integer_mod.so
error: command 'x86_64-pc-linux-gnu-g++' failed with exit status 1
x86_64-pc-linux-gnu-gcc -pthread -Os -pipe -march=native -mtune=native -fno-strict-aliasing -fPIC -I/usr//include -I/usr/include/csage -Isage/ext -I/usr/include/python2.7 -c sage/rings/padics/padic_fixed_mod_element.c -o build/temp.linux-x86_64-2.7/sage/rings/padics/padic_fixed_mod_element.o
 * ERROR: sci-mathematics/sage-5.2-r2 failed (compile phase):
 *   Building failed
 * 
 * Call stack:
In file included from sage/rings/padics/padic_fixed_mod_element.c:285:0:
/usr/include/csage/gmp_globals.h:6:0: warning: "EXTERN" redefined [enabled by default]
In file included from sage/rings/padics/padic_fixed_mod_element.c:282:0:
/usr/include/csage/ntl_wrap.h:34:0: note: this is the location of the previous definition
@kiwifb
Copy link
Collaborator

kiwifb commented Aug 20, 2012

Is this a hardened set up and when did you sync the overlay? Some "fixes" to givaro where made last week and we need to be sure you got them in.

@zasdfgbnm
Copy link
Contributor Author

$ eix givaro
[I] sci-libs/givaro [1]
Available versions: (~)3.2.16-r1^m M3.3.6^m M3.7.0^m {{static-libs}}
Installed versions: 3.2.16-r1^m(11:26:36 PM 08/16/2012)(-static-libs)
Homepage: http://ljk.imag.fr/CASYS/LOGICIELS/givaro/
Description: Givaro is a C++ library for arithmetic and algebraic computations

[1] "sage-on-gentoo" /var/lib/layman/sage-on-gentoo

@zasdfgbnm
Copy link
Contributor Author

Is 3.2.16-r1 the version with the problem fixed?

@zasdfgbnm
Copy link
Contributor Author

I sync my overlay just now.

@kiwifb
Copy link
Collaborator

kiwifb commented Aug 20, 2012

Presumably fixed. I am quite unable to review any c++ templating code but another user worked hard at it. It is unfortunate that we still seem to have trouble with it.
I may have to make an executive decision and adopt sage's patches for good or bad until we can switch to givaro-3.7.0, this is now a sage 5.4 item and not a 5.3 to my disappointment.

@jauhien
Copy link
Contributor

jauhien commented Aug 20, 2012

Hm. I'm becoming really tired of this package. I've thought its 'make check' should discover all issues with gcc-4.7. Will try to find a solution for finding all this problems other then reading through all givaro sources.
Until it will be fixed I suggest zasdfgbnm set -fpermissive in CXXFLAGS. This should help. Btw, zasdfgbnm, if you are using gcc-4.7 in gentoo that is masked you should be an experienced user and may be you can look for solution (the problem really is simple: degree and other similar stuff should be changed to this->degree, but the problem is where it should be changed, with the last patch I was sure, I've changed it anywhere it was needed, but I see I was wrong).

@jauhien
Copy link
Contributor

jauhien commented Aug 20, 2012

Oh, yeah. It seems I've understood where was the problem with the last patch. May be veelai had wrong version of givaro, because previous patching in givaro was done without changing revision number, so portage did not update it on veelai's computer after it was patched in overlay and so previous patch really worked for sage (but not for givaro's 'make check').
After veelai reported issue I rechecked givaro packaged, but only with its built in 'make check' and fixed all the problems found. But I see now some parts of code are not covered by 'make check', and those parts sage uses. So, there was problems fixed in previous patch, that are not fixed by the patch I've made using 'make check'. I'm looking for this problems now and will add fix to the current patch. I hope after this it will work.
Summary is: I will test everything next time.

@jauhien
Copy link
Contributor

jauhien commented Aug 20, 2012

I've found 3 places that need fix:
/usr/include/givaro/givpoly1proot.inl:294:15: note: use ‘this->degree’ instead
/usr/include/givaro/givpoly1proot.inl:301:9: note: use ‘this->init’ instead
/usr/include/givaro/givpoly1proot.inl:311:9: note: use ‘this->init’ instead

Will do it in few hours.

@kiwifb
Copy link
Collaborator

kiwifb commented Aug 20, 2012

I am very grateful that you are looking at this. I understand the basic concept of c++ but most code that use a decent amount of features of the language look like spaghetti to me.

jauhien added a commit to jauhien/sage-on-gentoo that referenced this issue Aug 20, 2012
(Portage version: 2.2.0_alpha121/git/Linux i686, unsigned Manifest commit)
kiwifb added a commit that referenced this issue Aug 20, 2012
sci-libs/givaro gcc-4.7 fix for issue #162
@kiwifb
Copy link
Collaborator

kiwifb commented Aug 20, 2012

Thanks for the pull. Can you test zasdfgbnm?

@jauhien
Copy link
Contributor

jauhien commented Aug 20, 2012

Frankly speaking it was my fault: I have not checked all the previous fixes important for sage was included in new patch. I checked it now. sage should compile without errors, and I hope it's the last problem with givaro, sage and gcc-4.7. )
There is one point more: afaik there are other packages dependent on givaro, I'll check them in a few time, may be there are still problems with them. So please do not close issue until I recheck this.
And yes, zasdfgbnm, check this fix please.

@jauhien
Copy link
Contributor

jauhien commented Aug 20, 2012

I've found only these packages depending on givaro on my computer:
jauhien@jpiatlicki givaro % equery depends givaro

  • These packages depend on givaro:
    sci-libs/linbox-1.1.6-r7 (=sci-libs/givaro-3.2_)
    sci-mathematics/sage-5.2-r2 (=sci-libs/givaro-3.2_)

I've tested sage once again with version of givaro ebuild synced from overlay. I've tested linbox too. Both sage and linbox do compile.

zasdfgbnm: please test not only whether sage compiles, but also please recompile linbox, so it also will be tested.

@zasdfgbnm
Copy link
Contributor Author

Both sage and linbox compile successfully

@kiwifb
Copy link
Collaborator

kiwifb commented Aug 20, 2012

thank you! Closing now.

@kiwifb kiwifb closed this as completed Aug 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants