* Installing manually built software in Guix
@ 2014-02-07 21:07 Mark H Weaver
2014-02-07 22:37 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Mark H Weaver @ 2014-02-07 21:07 UTC (permalink / raw)
To: guix-devel
Hello all,
As a Guile developer, I'm in the habit of building Guile from git, and
occasionally installing that version with --prefix=/usr.
As a Guix enthusiast, I've recently been experimenting with building
Guile from git, with my environment variables set to attempt to use only
things from Guix:
--8<---------------cut here---------------start------------->8---
export PATH=$HOME/.guix-profile/bin
export LIBRARY_PATH=$HOME/.guix-profile/lib
export CPATH=$HOME/.guix-profile/include
export MANPATH=$HOME/.guix-profile/share/man:$HOME/.guix-profile/man
export PKG_CONFIG_PATH=$HOME/.guix-profile/lib/pkgconfig
export PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages
export XDG_DATA_DIRS=$HOME/.guix-profile/share
export PERL5LIB=$HOME/.guix-profile/lib/perl5/site_perl
export ACLOCAL_PATH=$HOME/.guix-profile/share/aclocal
--8<---------------cut here---------------end--------------->8---
I just tried "make install", as root, with these same environment
variable settings (but with HOME=/home/mhw). It failed in the middle.
Here's the tail of the log:
--8<---------------cut here---------------start------------->8---
make[2]: Entering directory `/home/mhw/guile/guile-readline'
make install-am
make[3]: Entering directory `/home/mhw/guile/guile-readline'
make[4]: Entering directory `/home/mhw/guile/guile-readline'
/home/mhw/.guix-profile/bin/mkdir -p '/usr/lib'
/bin/bash ../libtool --mode=install /home/mhw/.guix-profile/bin/install -c libguilereadline-v-18.la '/usr/lib'
libtool: install: warning: relinking `libguilereadline-v-18.la'
libtool: install: (cd /home/mhw/guile/guile-readline; /bin/bash /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm )
libtool: relink: warning: `/home/mhw/.guix-profile/lib/libunistring.la' seems to be moved
libtool: relink: warning: `/home/mhw/.guix-profile/lib/libgmp.la' seems to be moved
libtool: relink: warning: `/home/mhw/.guix-profile/lib/libltdl.la' seems to be moved
/usr/lib/libgc.so: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libguilereadline-v-18.la' with the above command before installing it
make[4]: *** [install-libLTLIBRARIES] Error 1
make[4]: Leaving directory `/home/mhw/guile/guile-readline'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/mhw/guile/guile-readline'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/home/mhw/guile/guile-readline'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/mhw/guile'
make: *** [install] Error 2
--8<---------------cut here---------------end--------------->8---
What went wrong here? Is there a reasonable way to do this?
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing manually built software in Guix
2014-02-07 21:07 Installing manually built software in Guix Mark H Weaver
@ 2014-02-07 22:37 ` Ludovic Courtès
2014-02-09 4:50 ` Mark H Weaver
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2014-02-07 22:37 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> skribis:
> As a Guile developer, I'm in the habit of building Guile from git, and
> occasionally installing that version with --prefix=/usr.
>
> As a Guix enthusiast, I've recently been experimenting with building
> Guile from git, with my environment variables set to attempt to use only
> things from Guix:
I’ve been doing something similar.
> I just tried "make install", as root, with these same environment
> variable settings (but with HOME=/home/mhw). It failed in the middle.
> Here's the tail of the log:
>
> make[2]: Entering directory `/home/mhw/guile/guile-readline'
> make install-am
> make[3]: Entering directory `/home/mhw/guile/guile-readline'
> make[4]: Entering directory `/home/mhw/guile/guile-readline'
> /home/mhw/.guix-profile/bin/mkdir -p '/usr/lib'
> /bin/bash ../libtool --mode=install /home/mhw/.guix-profile/bin/install -c libguilereadline-v-18.la '/usr/lib'
> libtool: install: warning: relinking `libguilereadline-v-18.la'
> libtool: install: (cd /home/mhw/guile/guile-readline; /bin/bash /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm )
> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libunistring.la' seems to be moved
> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libgmp.la' seems to be moved
> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libltdl.la' seems to be moved
> /usr/lib/libgc.so: could not read symbols: File in wrong format
> collect2: error: ld returned 1 exit status
Here it’s trying to use the “wrong” libgc, which is itself possibly
linked with a different libc.
Can you try installing libgc from Guix, and make sure it’s the one
that’s picked up when building Guile?
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing manually built software in Guix
2014-02-07 22:37 ` Ludovic Courtès
@ 2014-02-09 4:50 ` Mark H Weaver
2014-02-09 5:17 ` Mark H Weaver
2014-02-09 20:50 ` Ludovic Courtès
0 siblings, 2 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-02-09 4:50 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Hi Ludovic,
ludo@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw@netris.org> skribis:
>
>> As a Guile developer, I'm in the habit of building Guile from git, and
>> occasionally installing that version with --prefix=/usr.
>>
>> As a Guix enthusiast, I've recently been experimenting with building
>> Guile from git, with my environment variables set to attempt to use only
>> things from Guix:
>
> I’ve been doing something similar.
>
>> I just tried "make install", as root, with these same environment
>> variable settings (but with HOME=/home/mhw). It failed in the middle.
>> Here's the tail of the log:
>>
>> make[2]: Entering directory `/home/mhw/guile/guile-readline'
>> make install-am
>> make[3]: Entering directory `/home/mhw/guile/guile-readline'
>> make[4]: Entering directory `/home/mhw/guile/guile-readline'
>> /home/mhw/.guix-profile/bin/mkdir -p '/usr/lib'
>> /bin/bash ../libtool --mode=install /home/mhw/.guix-profile/bin/install -c libguilereadline-v-18.la '/usr/lib'
>> libtool: install: warning: relinking `libguilereadline-v-18.la'
>> libtool: install: (cd /home/mhw/guile/guile-readline; /bin/bash
>> /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall
>> -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith
>> -Wswitch-enum -fno-strict-aliasing
>> -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g
>> -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o
>> libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline
>> -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm )
>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libunistring.la' seems to be moved
>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libgmp.la' seems to be moved
>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libltdl.la' seems to be moved
>> /usr/lib/libgc.so: could not read symbols: File in wrong format
>> collect2: error: ld returned 1 exit status
>
> Here it’s trying to use the “wrong” libgc, which is itself possibly
> linked with a different libc.
>
> Can you try installing libgc from Guix, and make sure it’s the one
> that’s picked up when building Guile?
I already had libgc from Guix, and indeed it was the one picked up by
Guile. The problem seems to be limited to guile-readline.
I guess the problem might be related to an "-rpath /usr/lib" that ends
up in 'relink_command' in guile-readline/libguilereadline-v-18.la:
--8<---------------cut here---------------start------------->8---
# Directory that this library needs to be installed in:
libdir='/usr/lib'
relink_command="(cd /home/mhw/guile/guile-readline; /bin/bash /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm @inst_prefix_dir@)"
--8<---------------cut here---------------end--------------->8---
I'm not sure why libtool is putting that rpath in there, but here are
some possibly relevant lines from config.log:
--8<---------------cut here---------------start------------->8---
BDW_GC_LIBS='-L/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/lib -lgc '
GUILE_LIBS=' -lcrypt -lm '
INTL_MACOSX_LIBS=''
LIBFFI_LIBS='-L/nix/store/49535xllwsa3mwddjj1hny84l0p7c453-libffi-3.0.13/lib -lffi '
PTHREAD_LIBS=''
READLINE_LIBS='-lreadline -lncurses '
--8<---------------cut here---------------end--------------->8---
All of the libraries listed above are in ~/.guix-profile/lib, but it
seems that only the ones that are found using 'pkg-config' end up with
corresponding -L arguments.
Also possibly relevant: I don't have LD_LIBRARY_PATH set. Should I?
The only environment variables I have pointing to anything Guix-related
are the ones I listed in my previous email. Am I missing anything?
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing manually built software in Guix
2014-02-09 4:50 ` Mark H Weaver
@ 2014-02-09 5:17 ` Mark H Weaver
2014-02-09 20:50 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-02-09 5:17 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> writes:
> I guess the problem might be related to an "-rpath /usr/lib" that ends
> up in 'relink_command' in guile-readline/libguilereadline-v-18.la:
>
> # Directory that this library needs to be installed in:
> libdir='/usr/lib'
> relink_command="(cd /home/mhw/guile/guile-readline; /bin/bash /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith -Wswitch-enum -fno-strict-aliasing -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm @inst_prefix_dir@)"
>
> I'm not sure why libtool is putting that rpath in there [...]
I have another piece of the puzzle. The first place I see this "-rpath"
is in guile-readline/Makefile.in:
--8<---------------cut here---------------start------------->8---
@HAVE_READLINE_TRUE@am_libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_rpath = \
@HAVE_READLINE_TRUE@ -rpath $(libdir)
--8<---------------cut here---------------end--------------->8---
and later in the same file:
--8<---------------cut here---------------start------------->8---
libguilereadline-v-@LIBGUILEREADLINE_MAJOR@.la: $(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_OBJECTS) $(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_DEPENDENCIES) $(EXTRA_libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_DEPENDENCIES)
$(AM_V_CCLD)$(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LINK) $(am_libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_rpath) $(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_OBJECTS) $(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD) $(LIBS)
--8<---------------cut here---------------end--------------->8---
I used the versions of autoconf, automake, libtool, and libtool:bin from
recent Guix master when running ./autogen.sh, ./configure, make, etc.
Thanks,
Mark
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Installing manually built software in Guix
2014-02-09 4:50 ` Mark H Weaver
2014-02-09 5:17 ` Mark H Weaver
@ 2014-02-09 20:50 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-02-09 20:50 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guix-devel
Mark H Weaver <mhw@netris.org> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Mark H Weaver <mhw@netris.org> skribis:
>>
>>> As a Guile developer, I'm in the habit of building Guile from git, and
>>> occasionally installing that version with --prefix=/usr.
>>>
>>> As a Guix enthusiast, I've recently been experimenting with building
>>> Guile from git, with my environment variables set to attempt to use only
>>> things from Guix:
>>
>> I’ve been doing something similar.
>>
>>> I just tried "make install", as root, with these same environment
>>> variable settings (but with HOME=/home/mhw). It failed in the middle.
>>> Here's the tail of the log:
>>>
>>> make[2]: Entering directory `/home/mhw/guile/guile-readline'
>>> make install-am
>>> make[3]: Entering directory `/home/mhw/guile/guile-readline'
>>> make[4]: Entering directory `/home/mhw/guile/guile-readline'
>>> /home/mhw/.guix-profile/bin/mkdir -p '/usr/lib'
>>> /bin/bash ../libtool --mode=install /home/mhw/.guix-profile/bin/install -c libguilereadline-v-18.la '/usr/lib'
>>> libtool: install: warning: relinking `libguilereadline-v-18.la'
>>> libtool: install: (cd /home/mhw/guile/guile-readline; /bin/bash
>>> /home/mhw/guile/libtool --silent --tag CC --mode=relink gcc -Wall
>>> -Wmissing-prototypes -Wdeclaration-after-statement -Wpointer-arith
>>> -Wswitch-enum -fno-strict-aliasing
>>> -I/nix/store/a9j9bl7m73rhlal9z83z3wbl9m17di4i-libgc-7.4.0/include -g
>>> -O2 -version-info 18:0:0 -export-dynamic -no-undefined -o
>>> libguilereadline-v-18.la -rpath /usr/lib readline.lo -lreadline
>>> -lncurses ../libguile/libguile-2.0.la ../lib/libgnu.la -lcrypt -lm )
>>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libunistring.la' seems to be moved
>>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libgmp.la' seems to be moved
>>> libtool: relink: warning: `/home/mhw/.guix-profile/lib/libltdl.la' seems to be moved
>>> /usr/lib/libgc.so: could not read symbols: File in wrong format
>>> collect2: error: ld returned 1 exit status
>>
>> Here it’s trying to use the “wrong” libgc, which is itself possibly
>> linked with a different libc.
>>
>> Can you try installing libgc from Guix, and make sure it’s the one
>> that’s picked up when building Guile?
>
> I already had libgc from Guix, and indeed it was the one picked up by
> Guile. The problem seems to be limited to guile-readline.
>
> I guess the problem might be related to an "-rpath /usr/lib" that ends
> up in 'relink_command' in guile-readline/libguilereadline-v-18.la:
It may be that if you’re installing to /usr/lib, then it’ll also want to
pick things up from there (that only happens on relink though, that is,
upon “make install.”)
[...]
> Also possibly relevant: I don't have LD_LIBRARY_PATH set. Should I?
No.
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-09 20:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07 21:07 Installing manually built software in Guix Mark H Weaver
2014-02-07 22:37 ` Ludovic Courtès
2014-02-09 4:50 ` Mark H Weaver
2014-02-09 5:17 ` Mark H Weaver
2014-02-09 20:50 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).