Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#19984 closed defect (fixed)

pcre +universal fails to build

Reported by: jenoworld@… Owned by: nox@…
Priority: High Milestone:
Component: ports Version: 1.7.1
Keywords: Cc: nerdling (Jeremy Lavergne)
Port: pcre

Description (last modified by nerdling (Jeremy Lavergne))

Hello,

I am new to MacPorts and I have a similar issue as Ticket #18448. I am trying to install/build an universal version of Apache, MySQL, and PHP using MacPorts on my test machine (Mac OS X 10.4.11, PPC) so that I can migrate it to the actual production server after I've done testing.

command that I am running: port -d install apache2 +universal

The error that I am getting:

Building pcre for architecture ppc
DEBUG: port allows a parallel build
DEBUG: Environment: MACOSX_DEPLOYMENT_TARGET='10.4'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pcre/work/pcre-7.9-ppc" && make all'
make  all-am
/bin/sh ./libtool --tag=CC   --mode=link /usr/bin/gcc-4.0 -m32  -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32  -L/opt/local/lib -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -m32 -o pcretest pcretest.o libpcreposix.la -lreadline 
/usr/bin/gcc-4.0 -m32 -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 -Wl,-syslibroot -Wl,/Developer/SDKs/MacOSX10.4u.sdk -m32 -o .libs/pcretest pcretest.o  -L/opt/local/lib ./.libs/libpcreposix.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pcre/work/pcre-7.9-ppc/.libs/libpcre.dylib -lreadline 
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libncurses.5.dylib referenced from: /opt/local/lib/libreadline.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regcomp
./.libs/libpcreposix.dylib(single module) definition of _regcomp
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regcomp.So) definition of _regcomp
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regexec
./.libs/libpcreposix.dylib(single module) definition of _regexec
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regexec.So) definition of _regexec
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regfree
./.libs/libpcreposix.dylib(single module) definition of _regfree
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regfree.So) definition of _regfree
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
_tgetent referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetflag referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetnum referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetstr referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tputs referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgoto referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
collect2: ld returned 1 exit status
make[1]: *** [pcretest] Error 1
make: *** [all] Error 2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pcre/work/pcre-7.9-ppc" && make all " returned error 2
Command output: make  all-am
/bin/sh ./libtool --tag=CC   --mode=link /usr/bin/gcc-4.0 -m32  -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32  -L/opt/local/lib -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -m32 -o pcretest pcretest.o libpcreposix.la -lreadline 
/usr/bin/gcc-4.0 -m32 -O2
 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -m32 -Wl,-syslibroot -Wl,/Developer/SDKs/MacOSX10.4u.sdk -m32 -o .libs/pcretest pcretest.o  -L/opt/local/lib ./.libs/libpcreposix.dylib /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pcre/work/pcre-7.9-ppc/.libs/libpcre.dylib -lreadline 
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning can't open dynamic library: /Developer/SDKs/MacOSX10.4u.sdk/opt/local/lib/libncurses.5.dylib referenced from: /opt/loc
al/lib/libreadline.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regcomp
./.libs/libpcreposix.dylib(single module) definition of _regcomp
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regcomp.So) definition of _regcomp
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regexec
./.lib
s/libpcreposix.dylib(single module) definition of _regexec
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regexec.So) definition of _regexec
/usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: warning multiple definitions of symbol _regfree
./.libs/libpcreposix.dylib(single module) definition of _regfree
/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libSystem.dylib(regfree.So) definition of _regfree
/usr/libexec/gcc/powerpc-
apple-darwin8/4.0.1/ld: Undefined symbols:
_tgetent referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetflag referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetnum referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tgetstr referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
_tputs referenced from libreadline expected to be defined in /opt/local/lib/li
bncurses.5.dylib
_tgoto referenced from libreadline expected to be defined in /opt/local/lib/libncurses.5.dylib
collect2: ld returned 1 exit status
make[1]: *** [pcretest] Error 1
make: *** [all] Error 2
Warning: the following items did not execute (for pcre): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Error: The following dependencies failed to build: pcre
Error: Status 1 encountered during processing.

Please help.

Thanks & Regards.

Attachments (1)

Picture 1.png (138.4 KB) - added by jenoworld@… 15 years ago.
here is a screenshot of the error msg

Download all attachments as: .zip

Change History (28)

Changed 15 years ago by jenoworld@…

Attachment: Picture 1.png added

here is a screenshot of the error msg

comment:1 Changed 15 years ago by nerdling (Jeremy Lavergne)

Description: modified (diff)

Please use the WikiFormatting for future copy/pasting of output. Thanks.

comment:2 Changed 15 years ago by nerdling (Jeremy Lavergne)

Jenoworld, since the ticket you referenced (#18448) has been resolved, have you tried doing the following?

  1. sudo port selfupdate
  2. sudo port clean apache2
  • and possibly uninstall, clean, and reinstall readline and ncurses

comment:3 Changed 15 years ago by jenoworld@…

Thanks for the fast respond and sorry for messing the post (without using WikiFormatting).

I'm not sure if #18448 has been resolved because I can't see any fixes or solution posted in the ticket. Please forgive my ignorance, I have no experience with programming nor Terminal. I am totally new to MacPorts. I decided to give MacPorts a try after having a lot of problem with the all-in-one software package such as MAMP.

So, what should I do now? Do I have to uninstall everything and start all over again? or just reinstall readline and ncurses (or pcre?)

Thank you.

comment:4 Changed 15 years ago by jenoworld@…

sudo port -d selfupdate:

MacPorts base version 1.710 installed
DEBUG: Rebuilding and reinstalling MacPorts if needed
Downloaded MacPorts base version 1.710

The MacPorts installation is not outdated so it was not updated
DEBUG: Setting MacPorts sources ownership to root

comment:5 Changed 15 years ago by jenoworld@…

And sudo port -d clean apache2 give me this:

The MacPorts installation is not outdated so it was not updated
DEBUG: Setting MacPorts sources ownership to root
jeno:~ jenoloo$ sudo port -d clean apache2
DEBUG: Found port in file :/opt/local/var/macports/sources/rsync.macports.org/release/ports/www/apache2
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/apache2
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: adding the default universal variant
DEBUG: Requested variant powerpc is not provided by port apache2.
DEBUG: Requested variant macosx is not provided by port apache2.
DEBUG: Executing variant darwin provides darwin
DEBUG: Executing org.macports.main (apache2)
---> Cleaning apache2
DEBUG: Executing org.macports.clean (apache2)
---> Removing build directory for apache2
DEBUG: Removing directory: /opt/local/var/macports/build
/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2
DEBUG: delete: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2
DEBUG: Removing symlink: /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/apache2/work
DEBUG: delete: /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/apache2/work

comment:6 Changed 15 years ago by jenoworld@…

When I check my installation by doing $ sudo installed, this is what I have:

The following ports are currently installed:
apr @1.3.5_0+universal (active)
apr-util @1.3.7_0+universal (active)
bzip2 @1.0.5_2+universal (active)
db46 @4.6.21_5+universal (active)
expat @2.0.1_0+universal (active)
gperf @3.0.4_0+universal (active)
libiconv @1.13_0+universal (active)
ncurses @5.7_0+universal (active)
ncursesw @5.7_0+universal (active)
openssl @0.9.8k_0+universal (active)
readline @6.0.000_1+universal (active)
sqlite3 @3.6.15_0+universal (active)
zlib @1.2.3_2+universal (active)


Since I am installing Apache by using $ port -d install apache2 +universal. I am assuming that all this parts/module is "packaged" together with Apache2 installation (which is required). If I reinstall readline and ncurses manually, obviously I am breaking the whole automation installation process, how am I going to continue back with the rest of the Apache2 installation?


Thanks.

comment:7 Changed 15 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

comment:8 Changed 15 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to nox@…
Port: pcre added

It appears you are having trouble building pcre +universal. That's a dependency of apache2. Assigning to the maintainer of pcre. It would also be helpful to know what version of Xcode you are running?

comment:9 Changed 15 years ago by nox@…

Status: newassigned
Summary: unable to build universal version apache2pcre +universal fails to build

Please try sudo port -v build pcre configure.ldflags="-L/opt/local/lib -lncurses"

comment:10 Changed 15 years ago by nox@…

Oops, nevermind my last message, I forgot something.

comment:11 Changed 15 years ago by nox@…

I've committed a wannabe fix in r52496. Please tell me if it worked.

comment:12 Changed 15 years ago by nerdling (Jeremy Lavergne)

I have these +universal successful compilations:

  • ppc, i386 on intel 10.5, target 10.5
  • ppc, i386 on intel 10.5, target 10.4u

comment:13 Changed 15 years ago by jenoworld@…

I am runnning Xcode 2.5 (Install 2.2 from my OS X installation disc and upgrade it to 2.5 using installer downloaded from Apple's website)

comment:14 Changed 15 years ago by jenoworld@…

sudo port -v build pcre configure.ldflags="-L/opt/local/lib -lncurses" give me this:

Error: Requested variants do not match original selection.
Please perform 'port clean pcre' or specify the force option.
Error: Status 1 encountered during processing.

FYI

comment:15 Changed 15 years ago by jenoworld@…

After performing $ sudo port clean pcre. I was able to perform sudo port -v build pcre configure.ldflags="-L/opt/local/lib -lncurses".

I will report back after It finish running.

comment:16 Changed 15 years ago by nerdling (Jeremy Lavergne)

MacPorts asked you to run clean because you were no longer using the +universal variant.

comment:17 in reply to:  16 ; Changed 15 years ago by jenoworld@…

Replying to snc@…:

MacPorts asked you to run clean because you were no longer using the +universal variant.

Oh? It finished successfully without any error but I am not getting the +universal version. Is there any possibility to get the universal version so that It will work on Intel?

comment:18 in reply to:  11 ; Changed 15 years ago by jenoworld@…

Replying to nox@…:

I've committed a wannabe fix in r52496. Please tell me if it worked.

May I know how do I perform this test?

comment:19 in reply to:  18 Changed 15 years ago by nerdling (Jeremy Lavergne)

Replying to jenoworld@…:

Oh? It finished successfully without any error but I am not getting the +universal version. Is there any possibility to get the universal version so that It will work on Intel?

You run the same command again, but add +universal to the end.

Replying to jenoworld@…:

May I know how do I perform this test?

Run port selfupdate, and then rebuild the port.

comment:20 in reply to:  17 ; Changed 15 years ago by blb@…

Replying to jenoworld@…:

Oh? It finished successfully without any error but I am not getting the +universal version. Is there any possibility to get the universal version so that It will work on Intel?

Note, you don't need +universal to work on Intel-based Macs, +universal usually builds for Intel and PowerPC (unless you've modified your macports.conf to change that). If you just need it built for your machine, +universal is completely unnecessary.

comment:21 in reply to:  20 Changed 15 years ago by jenoworld@…

Replying to blb@…:

Replying to jenoworld@…:

Oh? It finished successfully without any error but I am not getting the +universal version. Is there any possibility to get the universal version so that It will work on Intel?

Note, you don't need +universal to work on Intel-based Macs, +universal usually builds for Intel and PowerPC (unless you've modified your macports.conf to change that). If you just need it built for your machine, +universal is completely unnecessary.

So does that mean that It is not necessary for me to have +universal build although I am working with an PPC now and will migrate it to an Intel Mac Xserve later?

comment:22 Changed 15 years ago by jenoworld@…

I don't see that I have pcre installed:

The following ports are currently installed:
  apr @1.3.5_0+universal (active)
  apr-util @1.3.7_0+universal (active)
  bzip2 @1.0.5_2+universal (active)
  db46 @4.6.21_5+universal (active)
  expat @2.0.1_0+universal (active)
  gperf @3.0.4_0+universal (active)
  libiconv @1.13_0+universal (active)
  ncurses @5.7_0+universal (active)
  ncursesw @5.7_0+universal (active)
  openssl @0.9.8k_0+universal (active)
  readline @6.0.000_1+universal (active)
  sqlite3 @3.6.15_0+universal (active)
  zlib @1.2.3_2+universal (active)

How am I continue with the rest of the Apache installation?
Since you have a fix in r52496. Would you recommend that I uninstall all ports (sudo port -f uninstall installed) and start all over again?

comment:23 in reply to:  22 Changed 15 years ago by blb@…

Replying to jenoworld@…:

So does that mean that It is not necessary for me to have +universal build although I am working with an PPC now and will migrate it to an Intel Mac Xserve later?

If the Xserve is running the same major version of Mac OS X (10.4 in this case) as your PowerPC machine, then that should work, but if you also use a newer OS (10.5 or if after September, 10.6) then you'll need to redo all your MacPorts stuff anyway.

Replying to jenoworld@…:

How am I continue with the rest of the Apache installation?
Since you have a fix in r52496. Would you recommend that I uninstall all ports (sudo port -f uninstall installed) and start all over again?

r52496 was an update to pcre itself, so you'll need to first run sudo port selfupdate to make sure you have the changes from that commit, then try your original install again.

comment:24 Changed 15 years ago by jenoworld@…

Thanks guys. I've just reinstall Apache2 +universal and pcre +universal works!

--->  Fetching pcre
--->  Verifying checksum(s) for pcre
--->  Extracting pcre
--->  Configuring pcre
--->  Configuring pcre for architecture ppc
--->  Configuring pcre for architecture i386
--->  Building pcre
--->  Building pcre for architecture ppc
--->  Building pcre for architecture i386
--->  Staging pcre into destroot
--->  Staging pcre into destroot for architecture ppc
--->  Staging pcre into destroot for architecture i386
--->  Installing pcre @7.9_0+universal
--->  Activating pcre @7.9_0+universal
--->  Cleaning pcre

Unfortunately, I have another problem, this problem came up right after the pcre statement above:

--->  Fetching apache2
--->  Attempting to fetch httpd-2.2.11.tar.bz2 from http://distfiles.macports.org/apache2
--->  Verifying checksum(s) for apache2
--->  Extracting apache2
--->  Applying patches to apache2
--->  Configuring apache2
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2/work/httpd-2.2.11" && ./configure --prefix=/opt/local/apache2 --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --libdir=/opt/local/lib --with-expat=/opt/local --with-pcre=/opt/local --mandir=/opt/local/share/man --enable-mods-shared=all --enable-ssl --with-ssl=/opt/local --enable-cache --enable-disk_cache --enable-file_cache --enable-mem_cache --enable-deflate --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-ftp --disable-dependency-tracking " returned error 1
Command output: checking whether to enable mod_version... shared (all)
checking whether to enable mod_proxy... shared (all)
checking whether to enable mod_proxy_connect... shared (all)
checking whether to enable mod_proxy_ftp... shared (all)
checking whether to enable mod_proxy_http... shared (all)
checking whether to enable mod_proxy_ajp... shared (all)
checking whether to enable mod_proxy_balancer... shared (all)
  adding "-I$(top_srcdir)/modules/proxy/../generators" to INCLUDES
checking whether to enable mod_ssl... checking dependencies
checking for SSL/TLS toolkit base... /opt/local
checking for OpenSSL version... checking openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
OK
  forcing SSL_LIBS to "-lssl -lcrypto  -lpthread"
  adding "-lssl" to LIBS
  adding "-lcrypto" to LIBS
  adding "-lpthread" to LIBS
checking openssl/engine.h usability... yes
checking openssl/engine.h presence... yes
checking for openssl/engine.h... yes
checking for SSLeay_version... yes
checking for SSL_CTX_new... no
checking for ENGINE_init... yes
checking for ENGINE_load_builtin_engines... yes
checking for SSL_set_cert_store... no
configure: error: ... Error, SSL/TLS libraries were missing or unusable

Error: Status 1 encountered during processing.

Any idea?

comment:25 Changed 15 years ago by jenoworld@…

Found a similar Apache2 error at #19595: build failure apache2 + openldap variant.

They both shared the same line of error msg:

Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_apache2/work/httpd-2.2.11" && ./configure --prefix=/opt/local/apache2 --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --libdir=/opt/local/lib --with-expat=/opt/local --with-pcre=/opt/local --mandir=/opt/local/share/man --enable-mods-shared=all --enable-ssl --with-ssl=/opt/local --enable-cache --enable-disk_cache --enable-file_cache --enable-mem_cache --enable-deflate --enable-proxy --enable-proxy-connect --enable-proxy-http --enable-proxy-ftp --disable-dependency-tracking " returned error 1

Also found a similar error at Installing PHP5: "Error, SSL/TLS libraries were missing or unusable" which shared the same line of error code:

configure: error: ... Error, SSL/TLS libraries were missing or unusable

I dint see any solution to this in the post.

comment:26 Changed 15 years ago by nox@…

Resolution: fixed
Status: assignedclosed

At least, the PCRE problem is fixed. I'm closing this ticket.

comment:27 Changed 15 years ago by jenoworld@…

Thanks. I will make a new ticket for this.

Note: See TracTickets for help on using tickets.