Hi Mike,

it is possible for tup to figure shared libraries dependencies 
automatically with gcc flag?
Since gcc need to open the shared libraries and tup use FUSE to detect file 
read.
This will improve usability a lot for a large build system with a lot of so 
dependencies.

Best,
Robin


On Tuesday, November 8, 2011 at 6:03:19 PM UTC-8, [email protected] wrote:
>
> On Tue, Nov 8, 2011 at 5:06 PM, Whato <[email protected] <javascript:>> 
> wrote:
> > I encountered a problem, weirdly only after I reinstalled my OS but it
> > seems valid: Specifying the library as an input seems to put it into
> > the binary as a dependency as well, not just in the Tupfile. This
> > makes my program want to load it twice, once with the wrong name.
> >
> >  Tag        Type                         Name/Value
> >  0x0000000000000001 (NEEDED)             Shared library: [subdirectory/
> > sublibrary.so]
> >  0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
> >  0x0000000000000001 (NEEDED)             Shared library: [ld-linux-
> > x86-64.so.2]
> >  0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
> >  0x0000000000000001 (NEEDED)             Shared library: [libpcre.so.
> > 0]
> >  0x0000000000000001 (NEEDED)             Shared library:
> > [libglib-2.0.so.0]
> >  0x0000000000000001 (NEEDED)             Shared library:
> > [sublibrary.so]
> >
> > Removing the dependency and writing ' : subdirectory/sublibrary.so |>
> > |>' somewhere on the top seems to have solved it. I think it's
> > important to put that into the tutorial.
>
> Are you passing in flags like '-lsublibrary' *and* passing
> 'subdirectory/sublibrary.so' into the command-line as a filename? I
> think that would cause the behavior that you're seeing. If you only
> want the [sublibrary.so] name in there, you want to use the
> -lsublibrary flag and then make sure subdirectory/sublibrary.so
> doesn't get passed in explicitly to the linker command. It's possible
> that tup is putting it there in the %f flag if you have it listed as
> an input. Instead you'll want to list it as an order-only input. Ie,
> instead of:
>
> : *.o subdir/sublibrary.so |> gcc %f -o %o -lsublibrary ...
>
> you want:
> : *.o | subdir/sublibrary.so |> gcc %f -o %o -lsublibrary ...
>
> The pipe character separates the regular & order-only inputs - those
> on the left are used in %f, while those on the right aren't.
>
> If that is indeed the problem I can try to clarify on the example
> page. If not let me know and we can try to figure out what the real
> issue is!
>
> -Mike
>
>

-- 
-- 
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to