Hi Dima, I'm not sure what you mean by saying that the local install "was broken". It may be broken from the Sage perspective, but from the NTL perspective it is not. As I said, NTL was compiled and installed locally with default options, which do not include -fPIC. Apparently, Sage cannot link to libntl.a compiled without that option, but since this option is not a default one, Sage should not try to blindly link to libntl.a installed in the system. Perhaps, as you say, ./configure should figure that out and give a green or red light for such linking. In either case, that error is unexpected and should not have happened.
Regards, Max On Wed, Jun 19, 2024 at 3:43 PM Dima Pasechnik <dimp...@gmail.com> wrote: > > > On 19 June 2024 18:28:23 BST, Max Alekseyev <max...@gmail.com> wrote: > >Hello, > > > >I had a locally installed NTL compiled from sources with default options. > >While being compiled from sources, Sage failed to link with libntl.a with > a > >few complaints like > > > >[spkg-install] /usr/bin/ld: ///usr/local/lib/libntl.a(ZZX.o): > >relocation R_X86_64_TPOFF32 against > >`_ZZN3NTL8PlainSqrEPNS_2ZZEPKS0_lE36_ntl_hidden_variable_tls_local_ptr_t' > >can not be used when making a shared object; recompile with -fPIC > > > >I had to go to NTL, manually add -fPIC compiler option to its makefile, > >recompile and reinstall libntl to let Sage installation proceed. > > I think your local install was probably broken in a way that we don't > check for. > > > > However, I > >think this issue should have an automated solution - e.g., if Sage is not > >happy with the installed libntl.a, why cannot it compile its own version > in > >the way it likes (and ignore the installed one)? > > the test we have didn't pick up the issue with your library. Normally it > would only use the dynamic library, libntl.a is a static one. > > All this can be improved by adding more tests to > ./configure > > > Dima > > PS Feel free to repost to sage-devel@googlegroups.com, > > > > > > > > >Do I miss anything here? > > > >Regards, > >Max > > > -- 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/CAJkPp5MM%3DBW2JO9_VYE%3DQq%2B1KVyBpaWF%3DvgSRV5CCX-NS1-zHg%40mail.gmail.com.