chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Error with clang/FreeBSD


From: pdx
Subject: Re: [Chicken-users] Error with clang/FreeBSD
Date: Fri, 15 Feb 2013 13:31:04 -0800

> ### FROM: Vitaly Magerya <address@hidden>
> ### ON: Fri, 15 Feb 2013 20:58:04 0200
>
> address@hidden <address@hidden> wrote:
> > However, I keep wondering how the version compiled without '-z origin'
> > managed to pass the deployment test at all, if in fact '-z origin' is really
> > necessary in order for the deployed application to find the necessary files.
> > Is the test really testing this adequately, in other words, would an
> > application have failed under "real-world" conditions despite passing the
> > test?
>
> Did you test having another version of chicken installed system-wide?
> If so, without '-z origin' csc will link the resulting binary with
> system libchicken.so, thus making it seem like everything worked. If
> however you'll deinstall chicken, or move the deployed binaries to a
> machine where no chicken is installed (which is the point of -deploy),
> it'll fail to find system libchicken, and will refuse to start.
>
> (Run 'ldd' on a deployed binary; if it's linked with libchicken from
> /usr/local/lib, then there's a problem).
>

Of course, chicken *must* be installed before "gmake check" will run, so the system-wide chicken lib will be the current required version.

Rather, as you point out, the issue for deployment is which libchicken the executable will be linked to, that is, the one in the local application directory, or the chicken system library.

Since the only "deployed" applications I had were those produced in the test directory, but inspecting the results proved interesting:

Using my initial hack, i.e., "" instead of "-z origin":

address@hidden /usr/local/src/chicken/master/chicken-core/tests/rev-app-2]% ldd rev-app
rev-app:
libchicken.so.7 => /usr/local/lib/libchicken.so.7 (0x80081d000)
libm.so.5 => /lib/libm.so.5 (0x8010e2000)
libthr.so.3 => /lib/libthr.so.3 (0x801303000)
libc.so.7 => /lib/libc.so.7 (0x801526000)
address@hidden /usr/local/src/chicken/master/chicken-core/tests/rev-app-2]%

Using "-Wl,-z,origin":

address@hidden /usr/local/src/chicken/master/chicken-core/tests/rev-app-2]% ldd rev-app
rev-app:
libchicken.so.7 => /usr/local/src/chicken/master/chicken-core/tests/rev-app-2/libchicken.so.7 (0x80081d000)
libm.so.5 => /lib/libm.so.5 (0x8010e2000)
libthr.so.3 => /lib/libthr.so.3 (0x801303000)
libc.so.7 => /lib/libc.so.7 (0x801526000)
address@hidden /usr/local/src/chicken/master/chicken-core/tests/rev-app-2]%

This clearly validates your point about linking the local rather than the global libchicken in the deployed application. It sure looks like you're suggestion is the right solution.

Thanks,
J Altfas.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]