pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/44894: update emulators/hercules to 3.07
The following reply was made to PR pkg/44894; it has been noted by GNATS.
From: Rhialto <rhialto%falu.nl@localhost>
To: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, rhialto%falu.nl@localhost
Subject: Re: pkg/44894: update emulators/hercules to 3.07
Date: Mon, 2 May 2011 00:25:42 +0200
Hello!
On Sun 01 May 2011 at 21:11:06 +0900, Ryo ONODERA wrote:
> Hi,
>=20
> I think hercules-3.07 requires USE_LIBTOOL=3Dyes line in Makefile.
> And this line breaks build with following messages.
> Could you investigate it?
I added that line and I got the same error as you did.
I tried in two contexts, both amd64 and pkgsrc-2011Q1, but one in a
pkg_comp chroot with 5.0 userland, and one just normally under 5.1.
I do seem to remember a similar error in another package, and it had to
do with library ltdl (libtool dynamic loader), some confusion whether to
use the version from pkgsrc or the one included with the package.
I don't recall which way around it was there, but here the included
ltdl.c is built and included in libhercu(.a).
The FreeBSD port has a patch to remove the use of the included ltdl.c
file. I ported that over, and I added the pkgsrc version to the
Makefile:
=2Einclude "../../devel/libltdl/buildlink3.mk"
but that seemed to make the problem *worse*...
/bin/sh ./libtool --tag=3DCC --mode=3Dlink cc -O2 -I/usr/pkg/include -I/us=
r/include -W -Wall -O3 -march=3Dk8 -fomit-frame-pointer -L/usr/pkg/lib -Wl=
,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,--warn-common -o hercules -dl=
open self bootstrap.o hdlmain.o libherc.la libhercs.la -lpthread -lrt -lz -=
lresolv -lm -pthread -lbz2 -lpthread -lrt -lz -lresolv -lm -pthread -lbz2
libtool: link: rm -f .libs/hercules.nm .libs/hercules.nmS .libs/hercules.nmT
libtool: link: (cd .libs && cc -O2 -I/usr/include -c -fno-builtin "hercules=
S.c")
libtool: link: rm -f ".libs/herculesS.c" ".libs/hercules.nm" ".libs/hercule=
s.nmS" ".libs/hercules.nmT"
libtool: link: cc -O2 -I/home/rhialto/tmp/emulators/hercules/work.x86_64/.b=
uildlink/include -W -Wall -O3 -march=3Dk8 -fomit-frame-pointer -Wl,-R/usr/p=
kg/lib -Wl,--warn-common -o .libs/hercules .libs/herculesS.o bootstrap.o hd=
lmain.o -pthread -pthread -Wl,--export-dynamic -L/home/rhialto/tmp/emulato=
rs/hercules/work.x86_64/hercules-3.07/.libs -L/home/rhialto/tmp/emulators/h=
ercules/work.x86_64/hercules-3.07/decNumber/.libs -L/home/rhialto/tmp/emula=
tors/hercules/work.x86_64/.buildlink/lib ./.libs/libherc.so /home/rhialto/t=
mp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libherct.so /home/rhi=
alto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libhercd.so /ho=
me/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libhercu.=
so /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/lib=
hercs.so /home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/dec=
Number/.libs/libdecNumber.so ./.libs/libhercs.so -lpthread -lrt -lz -lresol=
v -lm -lbz2 -pthread -Wl,-rpath -Wl,/usr/pkg/lib
bootstrap.o: In function `main':
bootstrap.c:(.text+0x15): undefined reference to `lt_preloaded_symbols'
bootstrap.c:(.text+0x1a): undefined reference to `lt_dlpreload_default'
/home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
cu.so: undefined reference to `lt_dlerror'
/home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
cu.so: undefined reference to `lt_dlclose'
/home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
cu.so: undefined reference to `lt_dlopen'
/home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
cu.so: undefined reference to `lt_dlsym'
/home/rhialto/tmp/emulators/hercules/work.x86_64/hercules-3.07/.libs/libher=
cu.so: undefined reference to `lt_dlinit'
gmake[2]: *** [hercules] Error 1
I realised there was no "-lltdl" in there, and adding that brought the
errors back to what you already saw.
This lt_preloaded_symbols symbol is a strange one, since it gets
redefined in the pkgsrc version of ltdl.h:
#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
so when lt_preloaded_symbols is undefined, the #define has not been seen
in some location, which seems to indicate that the wrong "ltdl.h" file
has been used somewhere. Since hercules also has its own version of this
file, I removed it from consideration by adding this to the Makefile:
pre-configure:
rm ${WRKSRC}/ltdl.h
That seemed to work! So I'll include the new patches needed so that
ltdl.o is replaced by -lltdl in appropriate places. As mentioned, the
Makefile also needs this:
pre-configure:
rm ${WRKSRC}/ltdl.h
=2Einclude "../../devel/libltdl/buildlink3.mk"
Alternatively, by looking at configure.ac, it seems to be possible to
have OPTION_DYNAMIC_LOAD without HDL_USE_LIBTOOL, so that it used
dlopen() directly. However, as so many packages, it checks for dlopen()
in -ldl only. For NetBSD it is in libc, so it won't find that. I have
not yet tried to force things in that direction.
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# patches/patch-Makefile.in
# patches/patch-crypto_Makefile.in
# patches/patch-decNumber_Makefile.in
#
echo x - patches/patch-Makefile.in
sed 's/^X//' >patches/patch-Makefile.in << 'END-of-patches/patch-Makefile.i=
n'
X$NetBSD$
X
X--- Makefile.in.orig 2010-03-07 12:04:49.000000000 +0000
X+++ Makefile.in
X@@ -304,13 +304,13 @@ libherct_la_OBJECTS =3D $(am_libherct_la_O
X libhercu_la_DEPENDENCIES =3D $(am__DEPENDENCIES_1) libhercs.la
X am__libhercu_la_SOURCES_DIST =3D version.c hscutl.c hscutl2.c codepage.c \
X logger.c logmsg.c hdl.c hostinfo.c hsocket.c memrchr.c \
X- parser.c pttrace.c fthreads.c fishhang.c ltdl.c
X+ parser.c pttrace.c fthreads.c fishhang.c=20
X am__objects_5 =3D fthreads.lo
X @BUILD_FTHREADS_TRUE@am__objects_8 =3D $(am__objects_5)
X am__objects_6 =3D fishhang.lo
X @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@am__objects_9 =3D \
X @BUILD_FISHHANG_TRUE@@BUILD_FTHREADS_TRUE@ $(am__objects_6)
X-@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =3D ltdl.lo
X+@OPTION_DYNAMIC_LOAD_TRUE@am__objects_10 =3D=20
X am_libhercu_la_OBJECTS =3D version.lo hscutl.lo hscutl2.lo codepage.lo \
X logger.lo logmsg.lo hdl.lo hostinfo.lo hsocket.lo memrchr.lo \
X parser.lo pttrace.lo $(am__objects_8) $(am__objects_9) \
X@@ -687,7 +687,7 @@ dyndev_SRC =3D commadpt.c \
X @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC =3D $(dyndev_SRC)
X @OPTION_DYNAMIC_LOAD_TRUE@DYNSRC =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ltdl.c
X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS =3D=20
X @OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS =3D -module \
X @OPTION_DYNAMIC_LOAD_TRUE@ -no-undefined \
X@@ -913,8 +913,7 @@ EXTRA_libherc_la_SOURCES =3D $(fthreads_SR
X memrchr.c \
X $(dynamic_SRC) \
X $(extra_SRC) \
X- $(dyndev_SRC) \
X- ltdl.c
X+ $(dyndev_SRC)
X=20
X libherc_la_LDFLAGS =3D $(LIB_LD_FLAGS)
X libherc_la_LIBADD =3D libhercs.la \
X@@ -969,11 +968,11 @@ libherc_la_LIBADD =3D libhercs.la \
X hercules_SOURCES =3D bootstrap.c \
X hdlmain.c
X=20
X-hercules_LDADD =3D libherc.la libhercs.la $(LDADD)
X+hercules_LDADD =3D libherc.la libhercs.la $(LDADD) -lltdl
X hercules_LDFLAGS =3D $(HLDFLAGS)
X hercules_DEPENDENCIES =3D libherc.la libhercs.la $(HDEPS)
X @BUILD_SHARED_TRUE@herclin_SOURCES =3D herclin.c hdlmain.c
X-@BUILD_SHARED_TRUE@herclin_LDADD =3D libherc.la libhercs.la $(LDADD)
X+@BUILD_SHARED_TRUE@herclin_LDADD =3D libherc.la libhercs.la $(LDADD) -llt=
dl
X @BUILD_SHARED_TRUE@herclin_LDFLAGS =3D $(HLDFLAGS)
X @BUILD_SHARED_TRUE@herclin_DEPENDENCIES =3D libherc.la libhercs.la $(HDEP=
S)
X=20
X@@ -981,7 +980,7 @@ hercules_DEPENDENCIES =3D libherc.la libhe
X # side binaries
X #
X tools_LD_FLAGS =3D=20
X-tools_ADDLIBS =3D $(HERCLIBS2) $(LDADD)
X+tools_ADDLIBS =3D $(HERCLIBS2) $(LDADD) -lltdl
X @BUILD_HERCIFC_TRUE@hercifc_SOURCES =3D hercifc.c
X @BUILD_HERCIFC_TRUE@hercifc_LDADD =3D $(tools_ADDLIBS)
X @BUILD_HERCIFC_TRUE@hercifc_LDFLAGS =3D $(tools_LD_FLAGS)
X@@ -1166,7 +1165,6 @@ noinst_HEADERS =3D fishhang.h \
X hdl.h \
X crypto.h \
X sockdev.h \
X- ltdl.h \
X herc_getopt.h \
X service.h \
X chsc.h \
X@@ -1552,7 +1550,6 @@ distclean-compile:
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logger.Plo@am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logmsg.Plo@am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/losc.Plo@am__quote@
X-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltdl.Plo@am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/machchk.Plo@am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memrchr.Plo@am__quote@
X @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/omatape.Plo@am__quote@
END-of-patches/patch-Makefile.in
echo x - patches/patch-crypto_Makefile.in
sed 's/^X//' >patches/patch-crypto_Makefile.in << 'END-of-patches/patch-cry=
pto_Makefile.in'
X$NetBSD$
X
X--- crypto/Makefile.in.orig 2010-03-07 12:04:48.000000000 +0000
X+++ crypto/Makefile.in
X@@ -246,7 +246,7 @@ dyndev_SRC =3D dyncrypt.c sha1.c sha256.c=20
X @OPTION_DYNAMIC_LOAD_FALSE@DYNSRC =3D $(dyndev_SRC)
X @OPTION_DYNAMIC_LOAD_TRUE@DYNSRC =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ../ltdl.c
X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@DYNMOD_LD_FLAGS =3D=20
X @OPTION_DYNAMIC_LOAD_TRUE@DYNMOD_LD_FLAGS =3D -module \
X @OPTION_DYNAMIC_LOAD_TRUE@ -no-undefined \
END-of-patches/patch-crypto_Makefile.in
echo x - patches/patch-decNumber_Makefile.in
sed 's/^X//' >patches/patch-decNumber_Makefile.in << 'END-of-patches/patch-=
decNumber_Makefile.in'
X$NetBSD$
X
X--- decNumber/Makefile.in.orig 2010-03-07 12:04:48.000000000 +0000
X+++ decNumber/Makefile.in
X@@ -260,7 +260,7 @@ decNumber_SRC =3D decContext.c \
X @BUILD_SHARED_FALSE@XSTATIC =3D -static
X @BUILD_SHARED_TRUE@XSTATIC =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@LTDL =3D=20
X-@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D ../ltdl.c
X+@OPTION_DYNAMIC_LOAD_TRUE@LTDL =3D=20
X @OPTION_DYNAMIC_LOAD_FALSE@LIB_LD_FLAGS =3D $(XSTATIC) \
X @OPTION_DYNAMIC_LOAD_FALSE@ -no-undefined \
X @OPTION_DYNAMIC_LOAD_FALSE@ -avoid-version
END-of-patches/patch-decNumber_Makefile.in
exit
Regards,
-Olaf.
--=20
___ Olaf 'Rhialto' Seibert -- There's no point being grown-up if you=20
\X/ rhialto/at/xs4all.nl -- can't be childish sometimes. -The 4th Doctor
Home |
Main Index |
Thread Index |
Old Index