Loading ...
Sorry, an error occurred while loading the content.

ld trouble: Cannot get postfix (or pcre) to compile on HP-UX 11.11

Expand Messages
  • Alexander Skwar
    Hi! I m trying to compile postfix 2.2.5 on a HP-UX 11.11 system and have some problems in doing so (why else would I post? *G*). First, I ran the following
    Message 1 of 1 , Nov 28, 2005
    • 0 Attachment
      Hi!

      I'm trying to compile postfix 2.2.5 on a HP-UX 11.11
      system and have some problems in doing so (why else
      would I post? *G*).

      First, I ran the following while being in the postfix-2.2.5
      directory:

      make -f Makefile.init makefiles \
      "CCARGS=-DDEF_README_DIR=/usr/local/share/doc/postfix/README_FILES -DDEF_HTML_DIR=/usr/local/share/doc/postfix/HTML -DHAS_CDB -I/usr/local/include -DHAS_PCRE" \
      "AUXLIBS=/usr/local/lib/libcdb.a -L/usr/local/lib -lpcre"

      Next, I ran "make" and failed:

      gcc -Wmissing-prototypes -Wformat -DDEF_README_DIR=/usr/local/share/doc/postfix/README_FILES -DDEF_HTML_DIR=/usr/local/share/doc/postfix/HTML -DHAS_PCRE
      -I/usr/local/include -g -O -I. -I../../include -DHPUX11 -o master master.o master_conf.o master_ent.o master_sig.o master_avail.o master_spawn.o master_service.o
      master_status.o master_listen.o master_vars.o master_wakeup.o master_flow.o ../../lib/libglobal.a ../../lib/libutil.a -L/usr/local/lib -lpcre -lnsl
      ld: Can't find library for -lpcre
      Fatal error.
      collect2: ld gab 1 als Ende-Status zurck
      *** Fehlerrckkehrcode 1

      Stopp.
      *** Fehlerrckkehrcode 1

      Stopp.

      The system cannot find "-lpcre". Why's that? In /usr/local/lib,
      I've got:

      [11:27:28 vz6tml@dewuib07:~/Source/postfix-2.2.5] $ ls -la /usr/local/lib/*pcre*
      -rw-r--r-- 1 root sys 50154 2005-11-22 17:20 /usr/local/lib/libpcrecpp.a
      -rwxr-xr-x 1 root sys 1049 2005-11-22 17:20 /usr/local/lib/libpcrecpp.la
      -r-xr-xr-x 1 root sys 189928 2005-11-22 17:20 /usr/local/lib/libpcrecpp.sl
      -rw-r--r-- 1 root sys 8584 2005-11-22 17:20 /usr/local/lib/libpcreposix.a
      -rwxr-xr-x 1 root sys 811 2005-11-22 17:20 /usr/local/lib/libpcreposix.la
      -r-xr-xr-x 1 root sys 12288 2005-11-22 17:20 /usr/local/lib/libpcreposix.sl
      -rw-r--r-- 1 root sys 187246 2005-11-22 17:20 /usr/local/lib/libpcre.a
      -rwxr-xr-x 1 root sys 760 2005-11-22 17:20 /usr/local/lib/libpcre.la
      -r-xr-xr-x 1 root sys 176128 2005-11-22 17:20 /usr/local/lib/libpcre.sl

      [11:29:34 vz6tml@dewuib07:~/Source/postfix-2.2.5] $ gcc -v
      Es werden eingebaute Spezifikationen verwendet.
      Ziel: hppa64-hp-hpux11.11
      Konfiguriert mit: /proj/oscp/nightly/gcc/gcc_4_0_2_release/gcc/configure --enable-languages=c,c++ --enable-threads=posix --with-ld=/usr/ccs/bin/ld --without-gnu-ld
      --build=hppa64-hp-hpux11.11 --host=hppa64-hp-hpux11.11 --target=hppa64-hp-hpux11.11 --prefix=/opt/hp-gcc/4.0.2/lp64
      --with-as=/proj/oscp/nightly/gcc/gcc_4_0_2_release/HP-UX/hppa//opt/hp-gcc/4.0.2/lp64/bin/as
      Thread-Modell: posix
      gcc-Version 4.0.2

      This is gcc 4.0.2 from <http://hp.com/go/gcc>. I also tried 3.3.x from
      HP (PHSS_33033 is installed) and also gcc 4.x and 3.x from the Porting
      Centre. All behave identically.

      Postfix makes use of "pcre-config" to have it return the CFLAGS
      and libs. pcre is 6.4 from the Porting Centre. pcre-config returns
      correct paths:

      [13:33:45 vz6tml@dewuib07:~/Source/pcre-6.4] $ /usr/local/bin/pcre-config --libs --cflags
      -L/usr/local/lib -lpcre
      -I/usr/local/include

      Since Postfix is only failing on PCRE, I "hoped" that it's just
      some breakage in the Porting Centre package <http://hpux.asknet.de/ftp/hpux/Languages/pcre-6.4/pcre-6.4-hppa-11.11.depot.gz>.
      Thus, I tried to compile pcre by myself. Fails as well :(

      creating libpcreposix.la
      (cd .libs && rm -f libpcreposix.la && ln -s ../libpcreposix.la libpcreposix.la)
      gcc -c -g -O2 -I. -I. ./pcretest.c
      /bin/sh ./libtool --mode=link gcc -g -O2 -I. -I. -o pcretest pcretest.o \
      libpcre.la libpcreposix.la
      libtool: link: warning: this platform does not like uninstalled shared libraries
      libtool: link: `pcretest' will be relinked during installation
      gcc -g -O2 -I. -I. -o .libs/pcretest pcretest.o ./.libs/libpcre.sl ./.libs/libpcreposix.sl /u/vz6tml/Source/pcre-6.4/.libs/libpcre.sl -Wl,+b
      -Wl,/u/vz6tml/Source/pcre-6.4/.libs:/usr/local/lib
      ld: Can't find dependent library "libpcre.sl.0"
      Fatal error.
      collect2: ld returned 1 exit status
      *** Error exit code 1

      Stop.

      Why is that? Why is ld not finding libpcre.sl.0? It is in the
      .libs directory, which gets created and populated automatically
      during a "make" run:

      [14:20:31 vz6tml@dewuib07:~/Source/pcre-6.4] $ ls -la .libs
      total 1288
      drwxr-xr-x 2 vz6tml pcei 4096 Nov 28 14:20 .
      drwxr-xr-x 5 vz6tml pcei 4096 Nov 28 14:20 ..
      -rw-r--r-- 1 vz6tml pcei 417478 Nov 28 14:20 libpcre.a
      -rw-r--r-- 1 vz6tml pcei 391 Nov 28 14:20 libpcre.exp
      lrwxr-xr-x 1 vz6tml pcei 13 Nov 28 14:20 libpcre.la -> ../libpcre.la
      -rw-r--r-- 1 vz6tml pcei 790 Nov 28 14:20 libpcre.lai
      lrwxr-xr-x 1 vz6tml pcei 14 Nov 28 14:20 libpcre.sl -> libpcre.sl.0.1
      lrwxr-xr-x 1 vz6tml pcei 14 Nov 28 14:20 libpcre.sl.0 -> libpcre.sl.0.1
      -rwxr-xr-x 1 vz6tml pcei 354664 Nov 28 14:20 libpcre.sl.0.1
      -rw-r--r-- 1 vz6tml pcei 12158 Nov 28 14:20 libpcreposix.a
      -rw-r--r-- 1 vz6tml pcei 33 Nov 28 14:20 libpcreposix.exp
      lrwxr-xr-x 1 vz6tml pcei 18 Nov 28 14:20 libpcreposix.la -> ../libpcreposix.la
      -rw-r--r-- 1 vz6tml pcei 851 Nov 28 14:20 libpcreposix.lai
      lrwxr-xr-x 1 vz6tml pcei 19 Nov 28 14:20 libpcreposix.sl -> libpcreposix.sl.0.0
      lrwxr-xr-x 1 vz6tml pcei 19 Nov 28 14:20 libpcreposix.sl.0 -> libpcreposix.sl.0.0
      -rwxr-xr-x 1 vz6tml pcei 20672 Nov 28 14:20 libpcreposix.sl.0.0
      -rw-r--r-- 1 vz6tml pcei 3160 Nov 28 14:19 pcre_chartables.o
      -rw-r--r-- 1 vz6tml pcei 103144 Nov 28 14:19 pcre_compile.o
      -rw-r--r-- 1 vz6tml pcei 3040 Nov 28 14:20 pcre_config.o
      -rw-r--r-- 1 vz6tml pcei 66440 Nov 28 14:20 pcre_dfa_exec.o
      -rw-r--r-- 1 vz6tml pcei 63488 Nov 28 14:20 pcre_exec.o
      -rw-r--r-- 1 vz6tml pcei 5936 Nov 28 14:20 pcre_fullinfo.o
      -rw-r--r-- 1 vz6tml pcei 15216 Nov 28 14:20 pcre_get.o
      -rw-r--r-- 1 vz6tml pcei 3648 Nov 28 14:20 pcre_globals.o
      -rw-r--r-- 1 vz6tml pcei 4592 Nov 28 14:20 pcre_info.o
      -rw-r--r-- 1 vz6tml pcei 8304 Nov 28 14:20 pcre_maketables.o
      -rw-r--r-- 1 vz6tml pcei 4016 Nov 28 14:20 pcre_ord2utf8.o
      -rw-r--r-- 1 vz6tml pcei 3744 Nov 28 14:20 pcre_refcount.o
      -rw-r--r-- 1 vz6tml pcei 12736 Nov 28 14:20 pcre_study.o
      -rw-r--r-- 1 vz6tml pcei 5504 Nov 28 14:20 pcre_tables.o
      -rw-r--r-- 1 vz6tml pcei 5240 Nov 28 14:20 pcre_try_flipped.o
      -rw-r--r-- 1 vz6tml pcei 95176 Nov 28 14:20 pcre_ucp_findchar.o
      -rw-r--r-- 1 vz6tml pcei 4840 Nov 28 14:20 pcre_valid_utf8.o
      -rw-r--r-- 1 vz6tml pcei 3136 Nov 28 14:20 pcre_version.o
      -rw-r--r-- 1 vz6tml pcei 3896 Nov 28 14:20 pcre_xclass.o
      -rw-r--r-- 1 vz6tml pcei 11976 Nov 28 14:20 pcreposix.o

      As you can see, there IS a libpcre.sl.0 (not a file, but
      a link, but who cares...)?

      Why is that happening?

      Thanks,

      Alexander Skwar
      --
      Men of quality are not afraid of women for equality.
    Your message has been successfully submitted and would be delivered to recipients shortly.