#20406 closed defect (worksforme)
zlib is 32-bit on Snow Leopard
Reported by: | conradwt (Conrad Taylor) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.8.0 |
Keywords: | snowleopard | Cc: | |
Port: | zlib |
Description (last modified by blb@…)
The mysql5-server port is failing installation on Snow Leopard. I'm using MacBook Pro Intel Core 2 Duo. Next, I have the most recent Xcode developer tools Build 10A411. The transcript for the installation attempt appears below.
BEGIN TRANSCRIPT:
darnoc-laptop:~ conradwt$ sudo port install mysql5-server Password: ---> Computing dependencies for mysql5-server ---> Configuring mysql5 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_databases_mysql5/work/mysql-5.0.83" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --infodir=/opt/local/share/info --localstatedir=/opt/local/var/db/mysql5 --libdir=/opt/local/lib/mysql5 --bindir=/opt/local/lib/mysql5/bin --includedir=/opt/local/include/mysql5 --datadir=/opt/local/share/mysql5 --sysconfdir=/opt/local/etc/mysql5 --with-zlib-dir=/opt/local --with-openssl=/opt/local --with-extra-charsets=complex --with-federated-storage-engine --with-unix-socket-path=/opt/local/var/run/mysql5/mysqld.sock --with-mysqld-user=mysql --without-bench --enable-thread-safe-client --without-readline " returned error 1 Command output: checking sys/ipc.h presence... yes checking for sys/ipc.h... yes checking sys/shm.h usability... yes checking sys/shm.h presence... yes checking for sys/shm.h... yes checking linux/config.h usability... no checking linux/config.h presence... no checking for linux/config.h... no checking sys/prctl.h usability... no checking sys/prctl.h presence... no checking for sys/prctl.h... no checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking for floor in -lm... yes checking for gethostbyname_r in -lnsl_r... no checking for gethostbyname_r in -lnsl... no checking for gethostbyname_r... no checking for setsockopt... yes checking for yp_get_default_domain... yes checking for p2open... no checking for p2open in -lgen... no checking for bind... yes checking for library containing crypt... none required checking for library containing inet_aton... none required checking for sched_yield... yes checking for zlib compression library... configure: error: headers or binaries were not found in /opt/local/{include,lib} Error: The following dependencies failed to build: mysql5 Error: Status 1 encountered during processing.
END TRANSCRIPT:
Attachments (1)
Change History (17)
comment:1 Changed 15 years ago by blb@…
Description: | modified (diff) |
---|---|
Owner: | changed from macports-tickets@… to ryandesign@… |
Port: | mysql5 added; mysql5-server removed |
comment:2 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | snowleopard added |
---|---|
Priority: | High → Normal |
Summary: | mysql5-server port failed installation → mysql5 can't find zlib on Snow Leopard |
comment:3 follow-up: 5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
- Could you attach the config.log please?
- Is the zlib port installed and active?
- Are you trying to build a universal binary of any port?
- Can you try the mysql5-devel port instead of the mysql5 port and see if it has the same issue?
comment:4 follow-up: 6 Changed 15 years ago by tobypeterson
Works for me. You are running macports trunk, right? 1.7.1 will probably not work.
Changed 15 years ago by conradwt (Conrad Taylor)
Attachment: | config.log added |
---|
comment:5 Changed 15 years ago by conradwt (Conrad Taylor)
Replying to ryandesign@…:
- Could you attach the config.log please?
Yes, I can attach the file.
- Is the zlib port installed and active?
darnoc-laptop:mysql-5.0.83 conradwt$ port installed zlib The following ports are currently installed: zlib @1.2.3_2 (active)
- Are you trying to build a universal binary of any port?
I'm using 'sudo port install mysql5-server' to build and install the port.
- Can you try the mysql5-devel port instead of the mysql5 port and see if it has the same issue?
Here's the transcript from trying to install:
BEGIN TRANSCRIPT:
ddarnoc-laptop:~ conradwt$ sudo port install mysql5-devel Password: ---> Computing dependencies for mysql5-devel ---> Configuring mysql5-devel 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_databases_mysql5-devel/work/mysql-5.1.36" && ./configure --prefix=/opt/local --mandir=/opt/local/share/man --infodir=/opt/local/share/info --localstatedir=/opt/local/var/db/mysql5 --libdir=/opt/local/lib/mysql5 --bindir=/opt/local/lib/mysql5/bin --includedir=/opt/local/include/mysql5 --datadir=/opt/local/share/mysql5 --sysconfdir=/opt/local/etc/mysql5 --with-zlib-dir=/opt/local --with-ssl=/opt/local --with-extra-charsets=complex --with-unix-socket-path=/opt/local/var/run/mysql5/mysqld.sock --with-mysqld-user=mysql --without-docs --without-bench --with-partition --with-plugins=all --enable-thread-safe-client --without-readline --with-embedded-server --with-pic " returned error 1 Command output: checking for linux/config.h... no checking sys/prctl.h usability... no checking sys/prctl.h presence... no checking for sys/prctl.h... no checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking port.h usability... no checking port.h presence... no checking for port.h... no checking for ieeefp.h... (cached) no checking execinfo.h usability... yes checking execinfo.h presence... yes checking for execinfo.h... yes checking xfs/xfs.h usability... no checking xfs/xfs.h presence... no checking for xfs/xfs.h... no checking for floor in -lm... yes checking for gethostbyname_r in -lnsl_r... no checking for gethostbyname_r in -lnsl... no checking for gethostbyname_r... no checking for library containing setsockopt... none required checking for library containing bind... none required checking for library containing crypt... none required checking for library containing inet_aton... none required checking for library containing sched_yield... none required checking for zlib compression library... configure: error: headers or binaries were not found in /opt/local/{include,lib} Error: Status 1 encountered during processing.
END TRANSCRIPT:
Lastly, I had to use MacPorts 1.8.0 because MacPorts 1.7.x failed to run on Snow Leopard.
comment:6 Changed 15 years ago by conradwt (Conrad Taylor)
Replying to toby@…:
Works for me. You are running macports trunk, right? 1.7.1 will probably not work.
I'm using the 1.8 trunk because I'm on Snow Leopard.
comment:7 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Ok, there are some relevant-looking lines in the config.log:
configure:21812: checking for zlib compression library configure:21980: /usr/bin/gcc-4.2 -o conftest -O2 -arch x86_64 -I/opt/local/include -I/opt/local/include -L/opt/local/lib -arch x86_64 conftest.c -lm -L/opt/local/lib -lz >&5 ld: warning: in /opt/local/lib/libz.dylib, file is not of required architecture
So you're building a 64-bit version of mysql5, which makes sense since that's now the default as of Snow Leopard. But it doesn't think zlib was built 64-bit. This is conceivable as zlib doesn't use a standard configure script. I assume your libz is 32-bit? What does "file" say about your libz.dylib? I have this:
$ file /opt/local/lib/libz.dylib /opt/local/lib/libz.dylib: symbolic link to `libz.1.2.3.dylib' $ file /opt/local/lib/libz.1.2.3.dylib /opt/local/lib/libz.1.2.3.dylib: Mach-O universal binary with 2 architectures /opt/local/lib/libz.1.2.3.dylib (for architecture i386): Mach-O dynamically linked shared library i386 /opt/local/lib/libz.1.2.3.dylib (for architecture ppc): Mach-O dynamically linked shared library ppc $
Of course, I'm on Tiger, and I built universal for i386 ppc.
comment:8 Changed 15 years ago by conradwt (Conrad Taylor)
Here's my zlib information:
libz.1.2.3.dylib: Mach-O dynamically linked shared library i386 libz.1.dylib: Mach-O dynamically linked shared library i386 libz.a: current ar archive random library libz.dylib: Mach-O dynamically linked shared library i386
comment:9 follow-up: 12 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Port: | zlib added; mysql5 removed |
---|---|
Summary: | mysql5 can't find zlib on Snow Leopard → zlib is 32-bit on Snow Leopard |
Ok. So your zlib is 32-bit. I'll have to see if I can figure out why that is and how to fix it. For now a workaround would be to compile zlib with the universal variant.
sudo port deactivate zlib sudo port install zlib +universal
comment:10 Changed 15 years ago by tobypeterson
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Just rebuild/reinstall zlib, it builds 64-bit fine now. I'd assume you initially installed it with 1.7.x
comment:11 Changed 15 years ago by conradwt (Conrad Taylor)
When I first installed MacPorts, it was MacPorts 1.7.1 on Mac OS 10.5 (i.e. Leopard). Is there a migration plan for MacPorts to move from Leopard to Snow Leopard? Also, is there a way to rebuild all ports in one shot?
comment:12 Changed 15 years ago by conradwt (Conrad Taylor)
Replying to ryandesign@…:
Ok. So your zlib is 32-bit. I'll have to see if I can figure out why that is and how to fix it. For now a workaround would be to compile zlib with the universal variant.
sudo port deactivate zlib sudo port install zlib +universal
Is it necessary to to use +universal ?
comment:13 follow-up: 14 Changed 15 years ago by tobypeterson
Oh, if you "migrated" your MacPorts install from Leopard that would certainly explain it. There is no support for migrating installs between major OS releases - you have to rebuild everything.
comment:14 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to toby@…:
There is no support for migrating installs between major OS releases - you have to rebuild everything.
Correct. Please uninstall MacPorts and reinstall from trunk and then install your ports again.
comment:15 Changed 15 years ago by conradwt (Conrad Taylor)
All ports that were installed using MacPorts 1.7.1 using Leopard work without modification on Snow Leopard. It simply just works. The issue here is trying to upgrade these ports on Snow Leopard using MacPorts 1.8.0 from trunk. This is the point at which it is failing. Now, is correct to uninstall MacPorts 1.8.0 and reinstall MacPorts 1.8.0 from trunk and reinstall all my ports.
comment:16 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
We do not support moving a MacPorts installation from one major Mac OS X version to another, and suggest you uninstall and reinstall MacPorts.