* Help installing guile from source
@ 2017-10-13 12:01 Kaushal Modi
2017-10-13 16:51 ` Kaushal Modi
2017-10-14 1:15 ` Mark H Weaver
0 siblings, 2 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-10-13 12:01 UTC (permalink / raw)
To: guile-user
Hello,
I thought I installed all the dependencies for guile, but make failed at
the last moment with this error:
make all-am
make[3]: Entering directory '/home/kmodi/downloads/git/guile/guile-readline'
CC readline.lo
CCLD guile-readline.la
libtool: warning: '/home/kmodi/stowed/lib/libgc.la' seems to be moved
libtool: warning: '/home/kmodi/usr_local/6/lib64/libffi.la' seems to be
moved
libtool: warning: '/home/kmodi/stowed/lib/libunistring.la' seems to be moved
libtool: warning: '/home/kmodi/stowed/lib/libgmp.la' seems to be moved
libtool: warning: '/home/kmodi/stowed/lib/libltdl.la' seems to be moved
/usr/bin/ld: /home/kmodi/usr_local/6/lib/libncurses.a(lib_termcap.o):
relocation R_X86_64_32S against `_nc_globals' can not be used when making a
shared object; recompile with -fPIC
/home/kmodi/usr_local/6/lib/libncurses.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1753: guile-readline.la] Error 1
make[3]: Leaving directory '/home/kmodi/downloads/git/guile/guile-readline'
make[2]: *** [Makefile:1681: all] Error 2
make[2]: Leaving directory '/home/kmodi/downloads/git/guile/guile-readline'
make[1]: *** [Makefile:1848: all-recursive] Error 1
make[1]: Leaving directory '/home/kmodi/downloads/git/guile'
make: *** [Makefile:1733: all] Error 2
Here is what I did:
CFLAGS="-I${STOW_PKGS_TARGET}/include -I${STOW_PKGS_TARGET}/include/gc" \
LDFLAGS="-L${STOW_PKGS_TARGET}/lib" \
BDW_GC_CFLAGS="-L${STOW_PKGS_TARGET}/lib" \
BDW_GC_LIBS=-lgc \
./configure --prefix="${guile_install_dir}"
make
I install the libs and packages using stow organization:
So the lib/pkg will be installed in
~/stow/pkgs/PKGNAME/VERSION
and under there we will have
~/stow/pkgs/PKGNAME/VERSION/{bin,lib,share,include}
After running stow, symlinks to those are created in the STOW_PKGS_TARGET
dir
~/stowed
Here is a snippet of ls that showed the last few installed libs in
~/stowed/lib
lrwxrwxrwx 50 kmodi 12 Oct 14:19 libltdl.so.7.3.1 ->
../../stow/pkgs/libtool/2.4.6/lib/libltdl.so.7.3.1
lrwxrwxrwx 44 kmodi 12 Oct 14:19 libltdl.so ->
../../stow/pkgs/libtool/2.4.6/lib/libltdl.so
lrwxrwxrwx 44 kmodi 12 Oct 14:19 libltdl.la ->
../../stow/pkgs/libtool/2.4.6/lib/libltdl.la
lrwxrwxrwx 46 kmodi 12 Oct 14:19 libltdl.so.7 ->
../../stow/pkgs/libtool/2.4.6/lib/libltdl.so.7
lrwxrwxrwx 43 kmodi 12 Oct 14:19 libltdl.a ->
../../stow/pkgs/libtool/2.4.6/lib/libltdl.a
lrwxrwxrwx 60 kmodi 12 Oct 14:29 libunistring.so.2.0.0 ->
../../stow/pkgs/libunistring/0.9.7/lib/libunistring.so.2.0.0
lrwxrwxrwx 54 kmodi 12 Oct 14:29 libunistring.la ->
../../stow/pkgs/libunistring/0.9.7/lib/libunistring.la
lrwxrwxrwx 56 kmodi 12 Oct 14:29 libunistring.so.2 ->
../../stow/pkgs/libunistring/0.9.7/lib/libunistring.so.2
lrwxrwxrwx 54 kmodi 12 Oct 14:29 libunistring.so ->
../../stow/pkgs/libunistring/0.9.7/lib/libunistring.so
lrwxrwxrwx 53 kmodi 12 Oct 14:29 libunistring.a ->
../../stow/pkgs/libunistring/0.9.7/lib/libunistring.a
drwxr-xr-x - kmodi 12 Oct 14:45 pkgconfig/
lrwxrwxrwx 36 kmodi 12 Oct 14:45 libgc.so ->
../../stow/pkgs/gc/7.2g/lib/libgc.so
lrwxrwxrwx 42 kmodi 12 Oct 14:45 libgc.so.1.0.3 ->
../../stow/pkgs/gc/7.2g/lib/libgc.so.1.0.3
lrwxrwxrwx 36 kmodi 12 Oct 14:45 libgc.la -> ../../stow/pkgs/gc/7.2g/lib/
libgc.la
lrwxrwxrwx 38 kmodi 12 Oct 14:45 libgc.so.1 ->
../../stow/pkgs/gc/7.2g/lib/libgc.so.1
lrwxrwxrwx 44 kmodi 12 Oct 14:45 libcord.so.1.0.3 ->
../../stow/pkgs/gc/7.2g/lib/libcord.so.1.0.3
lrwxrwxrwx 40 kmodi 12 Oct 14:45 libcord.so.1 ->
../../stow/pkgs/gc/7.2g/lib/libcord.so.1
lrwxrwxrwx 38 kmodi 12 Oct 14:45 libcord.la -> ../../stow/pkgs/gc/7.2g/lib/
libcord.la
lrwxrwxrwx 38 kmodi 12 Oct 14:45 libcord.so ->
../../stow/pkgs/gc/7.2g/lib/libcord.so
lrwxrwxrwx 37 kmodi 12 Oct 14:45 libcord.a ->
../../stow/pkgs/gc/7.2g/lib/libcord.a
lrwxrwxrwx 35 kmodi 12 Oct 14:45 libgc.a ->
../../stow/pkgs/gc/7.2g/lib/libgc.a
So I don't know what these warnings mean:
libtool: warning: '/home/kmodi/stowed/lib/libgc.la' seems to be moved
libtool: warning: '/home/kmodi/usr_local/6/lib64/libffi.la' seems to be
moved
libtool: warning: '/home/kmodi/stowed/lib/libunistring.la' seems to be moved
libtool: warning: '/home/kmodi/stowed/lib/libgmp.la' seems to be moved
libtool: warning: '/home/kmodi/stowed/lib/libltdl.la' seems to be moved
Are those warnings OK to ignore? If so, what does the below error mean?
/usr/bin/ld: /home/kmodi/usr_local/6/lib/libncurses.a(lib_termcap.o):
relocation R_X86_64_32S against `_nc_globals' can not be used when making a
shared object; recompile with -fPIC
/home/kmodi/usr_local/6/lib/libncurses.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
Here are the versions of the installed dependencies:
Installing guile from its master branch.
- gmp 6.1.2
- libtool 2.4.6
- libunistring 0.9.7
- gc 7.2g
- ncurses 6.0
Thanks.
--
Kaushal Modi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help installing guile from source
2017-10-13 12:01 Help installing guile from source Kaushal Modi
@ 2017-10-13 16:51 ` Kaushal Modi
2017-10-14 1:15 ` Mark H Weaver
1 sibling, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-10-13 16:51 UTC (permalink / raw)
To: guile-user
I was able to finally install guile, yay!
On Fri, Oct 13, 2017 at 8:01 AM Kaushal Modi <kaushal.modi@gmail.com> wrote:
> So I don't know what these warnings mean:
>
> libtool: warning: '/home/kmodi/stowed/lib/libgc.la' seems to be moved
> libtool: warning: '/home/kmodi/usr_local/6/lib64/libffi.la' seems to be
> moved
> libtool: warning: '/home/kmodi/stowed/lib/libunistring.la' seems to be
> moved
> libtool: warning: '/home/kmodi/stowed/lib/libgmp.la' seems to be moved
> libtool: warning: '/home/kmodi/stowed/lib/libltdl.la' seems to be moved
>
> Are those warnings OK to ignore? If so, what does the below error mean?
>
Apparently those can be ignored, because the guile interpreter seems to
work fine.
> /usr/bin/ld: /home/kmodi/usr_local/6/lib/libncurses.a(lib_termcap.o):
> relocation R_X86_64_32S against `_nc_globals' can not be used when making a
> shared object; recompile with -fPIC
> /home/kmodi/usr_local/6/lib/libncurses.a: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
>
I fixed that by building ncurses with -fPIC (as the error hints).
Here's my ncurses build script with notes, if it helps someone:
ncurses_install_dir="${STOW_PKGS_ROOT}/ncurses/6.0"
# Fri Oct 13 08:10:02 EDT 2017 - kmodi
# -fPIC is added because building guile failed with this error:
# /usr/bin/ld: /home/kmodi/usr_local/6/lib/libncurses.a(lib_termcap.o):
relocation R_X86_64_32S against `_nc_globals' can not be used when making a
shared object; recompile with -fPIC
# /home/kmodi/usr_local/6/lib/libncurses.a: could not read symbols: Bad
value
# collect2: error: ld returned 1 exit status
# Also the INSTALL file says:
# If you have libtool installed, you can type
#
# ./configure --with-libtool
#
# to generate the appropriate static and/or shared libraries for your
platform
# using libtool.
# As I have libtool installed, adding that option too.
# -L${HOME}/usr_local/${MY_OSREV}/lib required for libgpm (GPM feature)
# --enable-widec is added because htop uses libncursesw
LDFLAGS="-L${HOME}/usr_local/${MY_OSREV}/lib
-L${HOME}/usr_local/${MY_OSREV}/lib64" \
CFLAGS="-fPIC" \
./configure --prefix="${ncurses_install_dir}" \
--enable-widec \
--with-libtool
make CFLAGS+=-fPIC
mkdir -p "${ncurses_install_dir}"
make install
--
Kaushal Modi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help installing guile from source
2017-10-13 12:01 Help installing guile from source Kaushal Modi
2017-10-13 16:51 ` Kaushal Modi
@ 2017-10-14 1:15 ` Mark H Weaver
2017-10-14 1:49 ` Kaushal Modi
1 sibling, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2017-10-14 1:15 UTC (permalink / raw)
To: Kaushal Modi; +Cc: guile-user
Hi,
Kaushal Modi <kaushal.modi@gmail.com> writes:
> I thought I installed all the dependencies for guile, but make failed at
> the last moment with this error:
>
> make all-am
> make[3]: Entering directory '/home/kmodi/downloads/git/guile/guile-readline'
> CC readline.lo
> CCLD guile-readline.la
> libtool: warning: '/home/kmodi/stowed/lib/libgc.la' seems to be moved
> libtool: warning: '/home/kmodi/usr_local/6/lib64/libffi.la' seems to be
> moved
> libtool: warning: '/home/kmodi/stowed/lib/libunistring.la' seems to be moved
> libtool: warning: '/home/kmodi/stowed/lib/libgmp.la' seems to be moved
> libtool: warning: '/home/kmodi/stowed/lib/libltdl.la' seems to be moved
> /usr/bin/ld: /home/kmodi/usr_local/6/lib/libncurses.a(lib_termcap.o):
> relocation R_X86_64_32S against `_nc_globals' can not be used when making a
> shared object; recompile with -fPIC
> /home/kmodi/usr_local/6/lib/libncurses.a: could not read symbols: Bad value
> collect2: error: ld returned 1 exit status
> make[3]: *** [Makefile:1753: guile-readline.la] Error 1
This is the relevant error, relating to ncurses. Apparently it was
unable to find a shared library for ncurses. It found only a static
library containing non-relocatable code, but that's not sufficient here
because Guile's trying to build a shared library which needs to be
relocatable.
You can look in 'config.log' for clues of what went wrong when it tried
to find the ncurses shared library.
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Help installing guile from source
2017-10-14 1:15 ` Mark H Weaver
@ 2017-10-14 1:49 ` Kaushal Modi
0 siblings, 0 replies; 4+ messages in thread
From: Kaushal Modi @ 2017-10-14 1:49 UTC (permalink / raw)
To: Mark H Weaver; +Cc: guile-user
On Fri, Oct 13, 2017, 9:15 PM Mark H Weaver <mhw@netris.org> wrote:
>
> This is the relevant error, relating to ncurses. Apparently it was
> unable to find a shared library for ncurses. It found only a static
> library containing non-relocatable code, but that's not sufficient here
> because Guile's trying to build a shared library which needs to be
> relocatable.
>
> You can look in 'config.log' for clues of what went wrong when it tried
> to find the ncurses shared library.
Thanks Mark,
As I later found, that *was* the case. I now have guile working.
--
Kaushal Modi
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-14 1:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13 12:01 Help installing guile from source Kaushal Modi
2017-10-13 16:51 ` Kaushal Modi
2017-10-14 1:15 ` Mark H Weaver
2017-10-14 1:49 ` Kaushal Modi
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).