30 Jun 20:46
scheme48-1.8 and --as-needed, DESTDIR, -D_GNU_SOURCE
From: Panagiotis Christopoulos <pchrist <at> gentoo.org>
Subject: scheme48-1.8 and --as-needed, DESTDIR, -D_GNU_SOURCE
Newsgroups: gmane.lisp.scheme.scheme48
Date: 2008-06-30 18:49:00 GMT
Subject: scheme48-1.8 and --as-needed, DESTDIR, -D_GNU_SOURCE
Newsgroups: gmane.lisp.scheme.scheme48
Date: 2008-06-30 18:49:00 GMT
Hi scheme48's developers, Recently, in gentoo, after upgrading to glibc-2.8, we experienced some bugs in compilation time of scheme48-1.8. The first had to do with headers: <cut> i686-pc-linux-gnu-gcc -c -DHAVE_CONFIG_H -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"i686-pc-linux-gnu\" -I ./c -I./c -I./c/bibop -O2 -march=i686 -pipe -pthread -o c/unix/socket.o c/unix/socket.c c/unix/socket.c: In function ‘gethostbyname_thread’: c/unix/socket.c:354: error: ‘struct hostent’ has no member named ‘h_addr’ c/unix/socket.c: In function ‘s48_get_host_by_name’: c/unix/socket.c:385: error: ‘struct hostent’ has no member named ‘h_addr’ make: *** [c/unix/socket.o] Error 1 make: *** Waiting for unfinished jobs.... </cut> This happens because the new header /usr/include/netdb.h does now: #if defined __USE_MISC || defined __USE_GNU # define h_addr h_addr_list[0] /* Address, for backward # compatibility.*/ #endif and to be __USE_GNU defined, "-D_GNU_SOURCE" must be added to the default $(DEFS). The second issue is the lack of DESTDIR in config_script, something I think you have fixed in your stable development branch as I can see in http://www.deinprogramm.de/cgi-bin/hgs48-stable.cgi/rev/1f349e4f8f3b , so this is just a reminder:) The third bug is a bit weird, and has to do with a failure that happens when --as-needed is used in our LD_FLAGS, and gets solved when: <cut> -$(LIBOBJS) $(LIBS)\ -$(EXTERNAL_OBJECTS) +$(LIBOBJS)\ +$(EXTERNAL_OBJECTS) $(LIBS) </cut> in Makefile.in Maybe you already know the issues, but if you don't, I hope that you will accept my tiny harmless patch(attached below) for your Makefile.in, and apply it on your next release, thank you, Panagiotis (sorry for sending this, to both {scheme-48,scheme48-bugs}@s48.org mailing lists, I'm just new to the lists, and I don't know where I should post) -- Panagiotis Christopoulos(pchrist) ------ Gentoo Lisp Project ------
--- Makefile.in.orig 2008-06-30 20:01:49.000000000 +0300 +++ Makefile.in 2008-06-30 20:08:12.000000000 +0300 @@ -8,7 +8,7 @@ VPATH = @srcdir@ CC = @CC@ LD = @LD@ -DEFS = @DEFS@ -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"$(HOST_ARCHITECTURE)\" +DEFS = @DEFS@ -D_GNU_SOURCE -D__COMPILING_SCHEME48_ITSELF__ -DS48_HOST_ARCHITECTURE=\"$(HOST_ARCHITECTURE)\" LIBS = @LIBS@ CFLAGS = @CFLAGS@ CPPFLAGS = @@ -286,8 +286,8 @@ c/scheme48.exp c/scheme48.def $(CC) $(LDFLAGS) $(LDFLAGS_VM) $(CFLAGS) -o $@ c/main.o \ $(OBJS) $(GC_OBJS) $(UNIX_OBJS) \ - $(LIBOBJS) $(LIBS) \ - $(EXTERNAL_OBJECTS) + $(LIBOBJS) \ + $(EXTERNAL_OBJECTS) $(LIBS) # Cygwin if test -x /usr/bin/dlltool; then \ dlltool --dllname $(VM).exe --output-lib $(VM).a --def $(srcdir)/c/scheme48.def; \ @@ -409,7 +409,7 @@ done inst-config-script: - config_script=$(bindir)/$(CONFIG_SCRIPT) && \ + config_script=$(DESTDIR)$(bindir)/$(CONFIG_SCRIPT) && \ sed -e 's,@incdir\@,$(incdir),g' \ -e 's,@libdir\@,$(libdir),g' \ -e 's,@CC\@,$(CC),g' \
RSS Feed