Subject: pkgsrc and my ALT Linux
To: None <pkgsrc-users@netbsd.org>
From: Slava Semushin <slava.semushin@gmail.com>
List: pkgsrc-users
Date: 01/24/2007 15:06:02
Hello, all!

I'm trying build pkgsrc under my ALT Linux distro by this HOWTO:
http://wiki.netbsd.se/index.php/How_to_use_pkgsrc_on_Linux

I have glibc2.5, gcc 4.1.1 and pkgsrc-2006Q4 from NetBSD site.

After run ./bootstrap --unprivileged I received error:

CC="gcc" LIBC= MAKEFLAGS= MAKESYSPATH=/home/coder/pkg/share/mk
./bmake.boot -f Makefile+
gcc -O2 -D_PATH_DEFSYSPATH=\"/home/coder/pkg/share/mk\" -I.
-I/usr/pkgsrc/bootstrap/work/bmake -DHAVE_CONFIG_H
-I../../libnbcompat -I/usr/pkgsrc/bootstrap/work/bmake/missing
-DNEED_HOST_CDEFS_H  -DMAKE_NATIVE  -DSIGNAL_FLAGS=SA_RESTART  -Werror
  -I../../libnbcompat -c /usr/pkgsrc/bootstrap/work/bmake/arch.c
cc1: warnings being treated as errors
/usr/pkgsrc/bootstrap/work/bmake/arch.c: In function 'Arch_Touch':
/usr/pkgsrc/bootstrap/work/bmake/arch.c:1038: warning: ignoring return
value of 'fwrite', declared with attribute warn_unused_result
*** Error code 1

This error occurs because ALT Linux uses -DFORTIFY_SOURCES by default.
I disable it with CFLAGS:

CFLAGS="-U_FORTIFY_SOURCE" ./bootstrap --unprivileged

but I've got another errors then:

gcc -DHAVE_CONFIG_H -DOPSYS_NAME=\"Linux\" -DMACHINE_ARCH=\"i386\"
-DBINDIR=\"/home/coder/pkg/sbin\"
-DMTREE_CMD=\"/home/coder/pkg/sbin/mtree\"
-DTAR_CMD=\"/home/coder/pkg/bin/tar\"
-DPAX_CMD=\"/home/coder/pkg/bin/pax\" -I../libnbcompat
-I../../libnbcompat -I. -I. -I../lib -U_FORTIFY_SOURCE -c verify.c
gcc -L../libnbcompat -L../../libnbcompat -L../lib -o pkg_add main.o
perform.o futil.o extract.o verify.o -linstall -lnbcompat
../lib/libinstall.a(ftpio.o): In function `ftp_start':
ftpio.c:(.text+0x7f7): undefined reference to `tgetent'
ftpio.c:(.text+0x816): undefined reference to `tgetstr'
ftpio.c:(.text+0x831): undefined reference to `tgetstr'
collect2: ld returned 1 exit status
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/bootstrap/work/pkg_install/add
*** Error code 1

But I have libcurses and all develompent packages:

coder@alt0 ~ $ rpm -qa "*curses*"
libncursesw-devel-5.6-alt1
python-modules-curses-2.4.4-alt7
libncursesw-5.6-alt1
libncurses-5.6-alt1
libncurses-devel-5.6-alt1

I think -ltinfo can help me, but how I can infrom bootstrap about it?


Thanks in advance!

-- 
+ Slava Semushin | slava.semushin @ gmail.com
+ ALT Linux Team | php-coder @ altlinux.ru