Please see comments/questions below...

On Wednesday, September 4, 2019 at 6:04:42 AM UTC-4, Dima Pasechnik wrote:
>
> On Tue, Sep 3, 2019 at 2:21 PM Victor Shoup <sh...@cs.nyu.edu 
> <javascript:>> wrote: 
> > 
>
> > When I compile a program that uses NTL, I always pass -pthread to g++. 
> > Doesn't that automatically cause the necessary pthread-specific library 
> to be linked in? 
>
> it does, if you don't use libtool to link (and typically one would 
> link an executable with 
> an explicit call to g++). 
>

So, based on that comment, it seems that there is no problem if you link 
with g++
rather than libtool.  But who or what uses libtool to link?
I would never have thought of doing that, as I thought libtool was a tool
for creating libraries, not linking programs.


> the problem is that libtool strips away the -pthread flag. 
> As long as you don't use it, there is no problem. See 
>
> https://www.gnu.org/software/libtool/manual/libtool.html#Stripped-link-flags 
> "13.1 Why does libtool strip link flags when creating a library? 
>
> When creating a shared library, but not when compiling or creating a 
> program, libtool drops some flags from the command line provided by 
> the user. This is done because flags unknown to libtool may interfere 
> with library creation or require additional support from libtool, and 
> because omitting flags is usually the conservative choice for a 
> successful build." 
>
>
This is confusing. If you use libtool to link, then the above quote would 
suggest that
in that context, libtool should not strip away any linker flags.
But you seem to be saying that it does.

So...I am still confused.

Regarding the libtool that I am bundling with NTL:
1) is it stripping some flags during compilation that should not be 
stripped?
2) is it stripping some flags during linking that should not be stripped?

Again, when I build and install a shared NTL on a linux system, everything 
works fine.
So I'm not even sure what the problem is:

I can build it and link to it in the build directory using libtool.
I can install it using libtool somewhere else and later link to it using 
g++.
What am I missing?!?

-- 
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/15c39061-e49d-4c6b-951b-6763aaea5dd0%40googlegroups.com.

Reply via email to