chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Only generate a versioned .so if USES_SONA


From: Michele La Monaca
Subject: Re: [Chicken-hackers] [PATCH] Only generate a versioned .so if USES_SONAME
Date: Wed, 17 Jul 2013 19:27:31 +0200

On Wed, Jul 17, 2013 at 4:42 PM, Jim Ursetto <address@hidden> wrote:
> Thank you for the report!
>
> I do not understand how that symlink is being created without the patch.

Me neither. While rebuilding and reinstalling from master to produce
the output of 'make install' I noticed that the symlink has
disappeared.

$ ls -l /usr/local/lib/
total 43049
drwxrwxr-x   3 mikele   mikele            3 Jul 17 18:44 chicken/
-rw-r--r--   1 mikele   mikele          14M Jul 17 18:44 libchicken.a
-rwxr-xr-x   1 mikele   mikele         6.6M Jul 17 18:44 libchicken.so.7*

I have no idea how that symlink ended there (for sure I didn't create
it manually). Sorry.

So, in the end, master doesn't build correctly on solaris as you supposed.

> If you have any extra time, I would appreciate the output from master 
> (without patch)
> of `make install` as well as `elfdump -d /usr/local/lib/libchicken.so.7`.

http://paste.call-cc.org/paste?id=47106217087bcca2f3cae65dc663db4d5ae822b3
http://paste.call-cc.org/paste?id=7106533d95b06421244b44c6ed9abb1a4f975a1b

Michele

>
> Thanks.
> Jim
>
> On Jul 17, 2013, at 5:56, Michele La Monaca <address@hidden> wrote:
>
>> It works on Solaris too, though master (without patch) and 4.8.0.3
>> build and work fine:
>>
>> 4.8.0.3:
>>
>> $ ls -l /usr/local/lib/
>> total 56116
>> drwxrwxr-x   3 mikele   mikele         3 May 13 11:45 chicken/
>> -rw-r--r--   1 mikele   mikele       14M May 13 11:45 libchicken.a
>> -rwxr-xr-x   1 mikele   mikele      6.6M May 13 11:45 libchicken.so*
>> -rwxr-xr-x   1 mikele   mikele      6.6M May 13 11:45 libchicken.so.6*
>>
>>
>> master:
>>
>> $ ls -l /usr/local/lib/
>> total 43048
>> drwxrwxr-x   3 mikele   mikele         3 Jul 17 09:58 chicken/
>> -rw-r--r--   1 mikele   mikele       14M Jul 17 09:58 libchicken.a
>> lrwxrwxrwx   1 mikele   mikele        15 Jul 17 09:58 libchicken.so ->
>> libchicken.so.7*
>> -rwxr-xr-x   1 mikele   mikele      6.6M Jul 17 09:58 libchicken.so.7*
>>
>>
>> master+patch:
>>
>> $ ls -l /usr/local/lib/
>> total 43047
>> drwxrwxr-x   3 mikele   mikele         3 Jul 17 10:14 chicken/
>> -rw-r--r--   1 mikele   mikele       14M Jul 17 10:14 libchicken.a
>> -rwxr-xr-x   1 mikele   mikele      6.6M Jul 17 10:14 libchicken.so*
>>
>>
>> Ciao,
>> Michele
>>
>> On Wed, Jul 17, 2013 at 12:10 AM, Jim Ursetto <address@hidden> wrote:
>>> I think this fixes the problem -- it works on OS X and Linux at least.  It 
>>> needs testing on
>>>
>>> 1) solaris
>>> 2) cross-compile (mario/christian?)
>>>
>>> Jim
>>>
>>>
>>>
>>> On Jul 16, 2013, at 12:06 AM, Jim Ursetto <address@hidden> wrote:
>>>
>>>> Hi,
>>>>
>>>> This patch turned out to break the OS X build.  It removes the need to set 
>>>> SONAME_VERSION when calling the install-bin target, and therefore 
>>>> implicitly sets SONAME_VERSION to .$BINARYVERSION.  Unfortunately, some 
>>>> platforms such as OS X didn't use an SONAME_VERSION at all.  It worked 
>>>> before because the SONAME_VERSION setting code was never reached on OS X, 
>>>> being conditional upon NEEDS_RELINKING, whatever that does.  Now, however, 
>>>> the version number is always set.
>>>>
>>>> The upshot is it installs libchicken.dylib.7 (which is probably an 
>>>> illegal/nonstandard name), but does *not* make a symlink from 
>>>> libchicken.dylib to it, as USES_SONAME is not set.  It is possible to work 
>>>> around this problem with a manual symlink.
>>>>
>>>> My thought was to make the install of the versioned library conditional 
>>>> upon USES_SONAME as well, so OS X would go back to plain libchicken.dylib. 
>>>>  However, for whatever reason, Solaris sets NEEDS_RELINKING *without* 
>>>> USES_SONAME, which would probably break with this solution.
>>>>
>>>> Therefore I'm not sure yet how to fix this correctly.  I think the logic 
>>>> is rickety and patching it just changed the failure case around.
>>>>
>>>> The ticket for this issue is http://bugs.call-cc.org/ticket/1022
>>>>
>>>> Jim
>>>>
>>>> On Feb 11, 2013, at 10:20 AM, Mario Domenech Goulart <address@hidden> 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> On Sun, 10 Feb 2013 19:29:18 +0100 (CET) Felix <address@hidden> wrote:
>>>>>
>>>>>>> I'm not sure about the right fix for this issue.  Can't we just get rid
>>>>>>> of SONAME_VERSION and use BYNARYVERSION instead?
>>>>>>
>>>>>> Sounds right to me.
>>>>>
>>>>> Attached is a patch that does that.  I've tested it for the mips
>>>>> cross-compilation case using "libs install-dev" as target and a regular
>>>>> installation (no cross-compilation) on linux/x86.  Both seem to work as
>>>>> expected.
>>>>>
>>>>>
>>>>>>> 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.
>>>>>>
>>>>>> Good point. Would you want to do this? Otherwise, create a ticket and
>>>>>> assign it to me, please.
>>>>>
>>>>> I've updated the wiki docs to suggest "install" instead of "libs
>>>>> install-dev" (and the expected generated tree).
>>>>>
>>>>> Notice that this wiki change doesn't need to be merged into git's manual
>>>>> if we fix the build system (I know it'll be hard to remember, but I just
>>>>> thought it should be mentioned anyway).  It's just a workaround to match
>>>>> the current chicken's build system behavior.
>>>>>
>>>>> Best wishes.
>>>>> Mario
>>>>> --
>>>>> http://parenteses.org/mario
>>>>> <0001-Drop-SONAME_VERSION-use-.-BINARYVERSION-instead.patch>_______________________________________________
>>>>> Chicken-hackers mailing list
>>>>> address@hidden
>>>>> https://lists.nongnu.org/mailman/listinfo/chicken-hackers
>>>
>>>
>>> _______________________________________________
>>> Chicken-hackers mailing list
>>> address@hidden
>>> https://lists.nongnu.org/mailman/listinfo/chicken-hackers
>>>



reply via email to

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