Thanks, I also recently realized it was coming from Singular.
Le 03/12/2021 à 16:10, Maarten Derickx a écrit : > Not really sure why they #define IntegerDomain 1 on line 25 there. But I > guess that doesn't matter.> It is just an occasion of having to different > libraries accidentally using the same name for > different things. Sure, that's why one should use namespaces as much as possible. Macros defined like this one are very invasive as they even conflict with names protected in a namespace, like Givaro's. It could be fixed by - either prefixing the macro with something like __SINGULAR in ordre to emulate a namespace - or #undef'ing it at the end of Singular's code. > > So this just means we should be careful with includes and other things so > that these things don't clash. Not sure that is can be solved by only re-ordering or carefully picking the includes. Is anyone from singular around here who sees an alternative way around it? I'll report the problem upstream. Clément > Op vrijdag 3 december 2021 om 11:54:08 UTC+1 schreef Clement Pernet: > > Hi, > > Working on > > https://trac.sagemath.org/ticket/32959 > <https://trac.sagemath.org/ticket/32959> > > I hit a compilation error due to > > sage/local/include/factory/factory.h: #define IntegerDomain 1 > > which conflicts with > > sage/local/include/givaro/givinteger.h: using IntegerDomain = > ZRing<Integer> > > See the compilation log ; > > [sagelib-9.5.beta7] In file included from > /home/soft/sage/local/include/singular/coeffs/coeffs.h:19, > [sagelib-9.5.beta7] from > /home/soft/sage/local/include/singular/polys/monomials/ring.h:12, > [sagelib-9.5.beta7] from > /home/soft/sage/local/include/singular/kernel/polys.h:15, > [sagelib-9.5.beta7] from > /home/soft/sage/local/include/singular/kernel/structs.h:25, > [sagelib-9.5.beta7] from > /home/soft/sage/local/include/singular/Singular/libsingular.h:7, > [sagelib-9.5.beta7] from > > build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:724: > [sagelib-9.5.beta7] /home/soft/sage/local/include/givaro/givinteger.h: At > global scope: > [sagelib-9.5.beta7] > /home/soft/sage/local/include/factory/factory.h:92:23: error: expected > nested-name-specifier before numeric constant > [sagelib-9.5.beta7] 92 | #define IntegerDomain 1 > [sagelib-9.5.beta7] | ^ > [sagelib-9.5.beta7] > /home/soft/sage/local/include/givaro/givinteger.h:412:11: note: in expansion > of > macro ‘IntegerDomain’ > [sagelib-9.5.beta7] 412 | using IntegerDomain = ZRing<Integer>; > [sagelib-9.5.beta7] | ^~~~~~~~~~~~~ > > I have no clue what is this Factory, and why it defines IntegerDomain to > 1. > > Any insight would be most welcome. > > Cheers. > > Clément > > > -- > 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+unsubscr...@googlegroups.com > <mailto:sage-devel+unsubscr...@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-devel/41bfbe41-5c62-428a-bd93-a5a2c0c5a0e3n%40googlegroups.com > > <https://groups.google.com/d/msgid/sage-devel/41bfbe41-5c62-428a-bd93-a5a2c0c5a0e3n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/72707f27-2041-4bce-e4d2-f103d3dac801%40gmail.com.