Re: Packaging skaware for Guix

From: 韋嘉誠 <Claes>
Date: Mon, 6 Jul 2015 13:39:29 +0200

On Mon, Jul 6, 2015 at 12:13 PM, Laurent Bercot <ska-skaware_at_skarnet.org> wrote:
>
> Hi Claes !
>
>
>> For me execline fails to build from source because -lskarnet is listed
>> as a dependency instead of in EXTRA_LIBS. Is this on purpose?
>
> Yes, this is intentional. EXTRA_LIBS is only used for things like
> -lrt or -lsocket which are needed for some binaries on some systems
> (and I don't think any execline binary needs them).

Ok.

> -lskarnet works as a dependency because GNU make will translate it
> to libskarnet.a or libskarnet.so depending on what you have and the
> configure options you've given. Are you using GNU make 4.0 or later ?
> What's the exact configure and make command line you are using, and
> the exact error message you're getting ?

Interesting, never heard of this make feature before. Does that only
work with static libs? Because the .so is in the search path. Or is it
the case that ld/gcc understand LIBRARY_PATH but make doesn't?


configure flags:
("CONFIG_SHELL=/gnu/store/r3mg86j35z90gbfbc3ry0467yv2nnqhx-bash-4.3.33/bin/bash"
"SHELL=/gnu/store/r3mg86j35z90gbfbc3ry0467yv2nnqhx-bash-4.3.33/bin/bash"
"--prefix=/gnu/store/8rqpsagsyw6b1prmbj9sibxvsbxhg3jj-execline-2.1.2.2"
"--enable-fast-install"
"--with-sysdeps=/gnu/store/0m46cqx1xr70vcpcckzx8qhbsqqql82s-skalibs-2.3.5.1/lib/skalibs/sysdeps")

skalibs lib and includes are found using CPATH and LIBRARY_PATH.

make is GNU make 4.1 and is simply run as "make -j2".


> Bear in mind that libskarnet.a is installed in /usr/lib/skalibs/
> by default, and if you change anything in the execline config, it
> may not find it without the proper --with-libdir option.

Yes, it finds libskarnet.so instead -- if I move -lskarnet to be a
library instead of a dependency. I will see if adding --with-lib
helps.


>> I patched tools/gen-deps.sh (recognize ${LIB,*} and -l.* as libraries,
>> in addition to ${.*_LIB}) and added a phase to generate a new
>> package/deps.mak before doing the compilation, and then it worked.
>
>
> You should not have to patch anything. You can always get the
> behaviour you want by providing the appropriate options to configure.

We will see. :-)


>> I'm surprised nobody else seems to be having this problem. In
>> particular, the Nix definition is just a plain build from source and
>> apparently Just Works. What am I missing?
>
>
> I don't know, but your error messages will tell. :)

I will try with the explicit --with-lib and see if that deconfuses make.
Received on Mon Jul 06 2015 - 11:39:29 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC