[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Need help (building ncurses-4.2)



Hi.

I need help...

Since people often ask "how can I help?" in this list, here is a
little problem to solve:

I'm trying to port the latest Debian ncurses4.2 package to the Hurd.

The source consist of the following files at the
"dists/slink/main/source/libs" directory in the Debian mirrors:

ncurses_4.2-2.dsc
ncurses_4.2-2.diff.gz
ncurses_4.2.orig.tar.gz

As a cross-compiler, I'm using the gcc-i386-gnu package from slink,
which was made by make-cross for use in a Debian 2.0 system.

Since ncurses needs the host compiler as well as the cross-compiler, it's
better not to change the PATH (as I usually do), but instead tell the
configure script that i386-gnu-gcc will be the cross-compiler and gcc the
host compiler (see the patch).

After unpacking the Debian source with dpkg-source -x, I apply the patches
below, and start the compilation by doing "debian/rules build".

Well, it *almost* works, except that I obtain *hundreds* of warning
messages like this one:

In file included from /usr/i386-gnu/include/errnos.h:307,
                 from /usr/i386-gnu/include/errno.h:36,
                 from ../../ncurses/curses.priv.h:91,
                 from ../../ncurses/lib_overlay.c:42:
/usr/i386-gnu/include/hurd/threadvar.h:110: warning: no previous prototype
for `__hurd_errno_location'

for every *.c file is compiled (lib_overlay.c in the example).

Finally, the compilation fails with a linker error, like this:

[...]
../obj_s/tic.o: In function `put_translate':
../obj_s/tic.o(.text+0x154): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0x196): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0x274): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0x2f4): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0x344): undefined reference to `__flshfp'
../obj_s/tic.o: In function `main':
../obj_s/tic.o(.text+0xdc2): undefined reference to `__fillbf'
../obj_s/tic.o(.text+0xde8): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0xe22): undefined reference to `__fillbf'
../obj_s/tic.o(.text+0xea4): undefined reference to `__flshfp'
../obj_s/tic.o(.text+0xf22): undefined reference to `__fillbf'
../obj_s/tic.o(.text+0xf86): undefined reference to `__flshfp'
../lib/libncurses.so: undefined reference to `__hurd_sigthread_variables'
../lib/libncurses.so: undefined reference to `__hurd_threadvar_stack_mask'
../lib/libncurses.so: undefined reference to `__hurd_sigthread_stack_base'
../lib/libncurses.so: undefined reference to
`__hurd_threadvar_stack_offset'
../lib/libncurses.so: undefined reference to `__hurd_sigthread_stack_end'
make[2]: *** [tic] Error 1


Note: The libraries themselves *are* created, but since I'm unable to link
with them, they seem to be useless...

So if anybody here wants to follow these steps, go ahead and tell me what
I'm doing wrong. I suspect that it should work with a minor change, but I
don't know which exactly is the required "minor change" :-)

Here are the patches I have so far, any help would be greatly appreciated:


--- ncurses-4.2/configure.orig	Sun Nov  1 16:05:04 1998
+++ ncurses-4.2/configure	Sun Nov  1 16:05:29 1998
@@ -2214,5 +2214,5 @@
 		cf_cv_rm_so_locs=yes
 		;;
-	linux*)
+	linux*|gnu)
 		# tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
 		CC_SHARED_OPTS='-fPIC'
--- ncurses-4.2/aclocal.m4.orig	Sun Nov  1 16:05:42 1998
+++ ncurses-4.2/aclocal.m4	Sun Nov  1 16:06:00 1998
@@ -1199,5 +1199,5 @@
 		cf_cv_rm_so_locs=yes
 		;;
-	linux*)
+	linux*|gnu)
 		# tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
 		CC_SHARED_OPTS='-fPIC'
--- ncurses-4.2.orig/debian/rules	Mon Nov  2 20:44:48 1998
+++ ncurses-4.2/debian/rules	Mon Nov  2 20:46:23 1998
@@ -43,9 +43,12 @@
 		mkdir builddir; \
 	fi
-	cd builddir && env CFLAGS="$(CFLAGS)" ../configure --prefix=/usr \
+	cd builddir && env CFLAGS="$(CFLAGS)" CC=i386-gnu-gcc HOSTCC=gcc \
+		CXX=i386-gnu-g++ ../configure --prefix=/usr \
 		--with-install-prefix=$(fulltempdir) --with-shared \
-		--with-profile --with-gpm --disable-rpath --enable-echo \
+		--with-profile --disable-rpath --enable-echo \
 		--enable-warnings --enable-overwrite \
-		--disable-termcap && $(MAKE) all
+		--build=i386-linux --host=i386-gnu \
+		--disable-termcap && $(MAKE) \
+		CC=i386-gnu-gcc HOSTCC=gcc CXX=i386-gnu-g++ all
 	touch stamp-build
 


-- 
 "490924c4c97e051774d9be05ae4fb5a9" (a truly random sig)



Reply to: