[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Apply the same naming scheme for .so libs
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-hackers] [PATCH] Apply the same naming scheme for .so libs in "libs" target |
Date: |
Sun, 10 Feb 2013 11:16:29 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Hi,
On Sat, 2 Feb 2013 18:08:34 +0100 Christian Kellermann <address@hidden> wrote:
> As I went through the instruction for cross-compilation in the
> manual I read about the "libs" target. It seems to me that it creates
> the so lib and its symbolic link the opposite way as install-libs
> does. Which results in a broken link when you call install-libs
> later on. I also think that the way install-lib does it is better
> than the "libs" way. I write better because there is still a minor
> number missing in our .so files but that's another story...
>
> So if you are still with me I would be honored if you find some
> time to give this some thought. I think the cross compilation process
> is broken without the patch. I have tested this for mipsel and arm
> cross compilation. So far I cannot say that its all working for me,
> I am still sorting out the leftover debris, but this looks broken
> hence the patch. Maybe I got it all wrong...
I caught that problem while trying to reproduce the problem reported by
Ivan Filgueiras (see chicken-users' "How do I build chicken for the MIPS
arch?" thread).
Here's what I get during the install phase:
$ make ... libs install-dev
mkdir -p "/home/mario/local/chicken-mips-target/usr/lib"
install -m755 libchicken.so
"/home/mario/local/chicken-mips-target/usr/lib/libchicken.so"
cd "/home/mario/local/chicken-mips-target/usr/lib" && ln -sf libchicken.so.6
libchicken.so
That indeed looks wrong, since ln tries to create a link to a file that
has not been installed (libchicken.so.6). The one which was actually
installed was libchicken.so.
However, if I run the install target, I get
$ make ... install
mkdir -p "/home/mario/local/chicken-mips-target/usr/lib"
install -m755 libchicken.so
"/home/mario/local/chicken-mips-target/usr/lib/libchicken.so.6"
cd "/home/mario/local/chicken-mips-target/usr/lib" && ln -sf libchicken.so.6
libchicken.so
which is correct.
That happens because SONAME_VERSION (used by the install-libs target) is
set by the install-bin target, which is not a dependency for libs nor
install-dev. However, install-bin is a dependency for install, so
SONAME_VERSION gets set and when install-libs is processed, it does the
right thing.
I'm not sure about the right fix for this issue. Can't we just get rid
of SONAME_VERSION and use BYNARYVERSION instead?
Meanwhile, how about changing the manual (Cross development chapter) to
instruct users to use the "install" target instead of "libs
install-dev". It'll probably install unnecessary things, but won't
break anything, as far as I can see. With the current instructions, the
target installation ends up with a libchicken that is a dangling link.
Best wishes.
Mario
--
http://parenteses.org/mario