Failure building apache22 and mysql51

Sorin Pânca sorin.panca at psrk.com
Mon Jun 23 15:44:44 UTC 2008


Hello people!
I recently upgraded a amd64 machine from FreeBSD-6.2-RELEASE-p11 to 
FreeBSD-7.0-RELEASE-p2 using the tutorial found at 
http://www.daemonology.net/blog/2007-11-11-freebsd-major-version-upgrade.html
All went well with the base system.
Now with the ports...
mysql51-server was installed and I noticed it fails to start (I mean it 
dies within a few seconds after the restart).
First I tried doing portupgrade -af for a couple of times but after 
compiling everything, I'm still unlucky. Then I tried portupgrade -aPPR, 
also to no avail.



Then:
# cd /usr/ports/databases/mysql51-server
# portupgrade -f
--->  Reinstalling 'mysql-server-5.1.25' (databases/mysql51-server)
--->  Building '/usr/ports/databases/mysql51-server'
===>  Cleaning for mysql-server-5.1.25
===>  Vulnerability check disabled, database not found

You may use the following build options:

         WITH_CHARSET=charset    Define the primary built-in charset 
(latin1).
         WITH_XCHARSET=list      Define other built-in charsets (may be 
'all').
         WITH_COLLATION=collate  Define default collation 
(latin1_swedish_ci).
         WITH_OPENSSL=yes        Enable secure connections.
         WITH_LINUXTHREADS=yes   Use the linuxthreads pthread library.
         WITH_PROC_SCOPE_PTH=yes Use process scope threads
                                 (try it if you use libpthread).
         BUILD_OPTIMIZED=yes     Enable compiler optimizations
                                 (use it if you need speed).
         BUILD_STATIC=yes        Build a static version of mysqld.
                                 (use it if you need even more speed).
         WITH_NDB=yes            Enable support for NDB Cluster.

===>  Extracting for mysql-server-5.1.25
=> MD5 Checksum OK for mysql-5.1.25-rc.tar.gz.
=> SHA256 Checksum OK for mysql-5.1.25-rc.tar.gz.
[ ... ]
(cd .libs && rm -f libndb.la && ln -s ../libndb.la libndb.la)
if /usr/local/bin/libtool --preserve-dup-deps --tag=CC --mode=compile cc 
-DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local\"" 
-DDATADIR="\"/var/db/mysql\"" -DSHAREDIR="\"/usr/local/share/mysql\"" 
-DPLUGINDIR="\"/usr/local/lib/mysql/plugin\"" -DHAVE_EVENT_SCHEDULER 
-DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include 
-I../regex -I.     -O2 -fno-strict-aliasing -pipe     -MT udf_example.lo 
-MD -MP -MF ".deps/udf_example.Tpo" -c -o udf_example.lo udf_example.c; \
         then mv -f ".deps/udf_example.Tpo" ".deps/udf_example.Plo"; 
else rm -f ".deps/udf_example.Tpo"; exit 1; fi
  cc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\"/usr/local\" 
-DDATADIR=\"/var/db/mysql\" -DSHAREDIR=\"/usr/local/share/mysql\" 
-DPLUGINDIR=\"/usr/local/lib/mysql/plugin\" -DHAVE_EVENT_SCHEDULER 
-DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include 
-I../regex -I. -O2 -fno-strict-aliasing -pipe -MT udf_example.lo -MD -MP 
-MF .deps/udf_example.Tpo -c udf_example.c  -fPIC -DPIC -o 
.libs/udf_example.o
  cc -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME=\"/usr/local\" 
-DDATADIR=\"/var/db/mysql\" -DSHAREDIR=\"/usr/local/share/mysql\" 
-DPLUGINDIR=\"/usr/local/lib/mysql/plugin\" -DHAVE_EVENT_SCHEDULER 
-DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include 
-I../regex -I. -O2 -fno-strict-aliasing -pipe -MT udf_example.lo -MD -MP 
-MF .deps/udf_example.Tpo -c udf_example.c -o udf_example.o >/dev/null 2>&1
/usr/local/bin/libtool --preserve-dup-deps --tag=CC --mode=link cc  -O2 
-fno-strict-aliasing -pipe       -o udf_example.la  -module -rpath 
/usr/local/lib/mysql udf_example.lo  -pthread -lcrypt -lm  -pthread
cc -shared  .libs/udf_example.o  -pthread -lcrypt -lm -pthread  -pthread 
-pthread -pthread -pthread -pthread -pthread -Wl,-soname 
-Wl,udf_example.so.0 -o .libs/udf_example.so.0
/usr/bin/ld: /usr/lib/libpthread.a(thr_mutex.o): relocation R_X86_64_32 
can not be used when making a shared object; recompile with -fPIC
/usr/lib/libpthread.a: could not read symbols: Bad value
gmake[3]: *** [udf_example.la] Error 1
gmake[3]: Leaving directory 
`/usr/ports/databases/mysql51-server/work/mysql-5.1.25-rc/sql'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory 
`/usr/ports/databases/mysql51-server/work/mysql-5.1.25-rc/sql'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory 
`/usr/ports/databases/mysql51-server/work/mysql-5.1.25-rc/sql'
gmake: *** [all-recursive] Error 1
*** Error code 2

Stop in /usr/ports/databases/mysql51-server.
** Command failed [exit code 1]: /usr/bin/script -qa 
/tmp/portupgrade.94200.0 env UPGRADE_TOOL=portupgrade 
UPGRADE_PORT=mysql-server-5.1.25 UPGRADE_PORT_VER=5.1.25 make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
         ! databases/mysql51-server (mysql-server-5.1.25)        (new 
compiler error)





and again, with portupgrade -N www/apache22 this time:
[ ... ]
/bin/sh /usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/libtool 
--silent --mode=compile cc   -O2 -fno-strict-aliasing -pipe 
-I/usr/local/include/mysql -DHAVE_MYSQL_H -I/usr/include -DHAVE_CONFIG_H 
    -I./include 
-I/usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/include/arch/unix 
-I./include/arch/unix 
-I/usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/include  -o 
user/unix/userinfo.lo -c user/unix/userinfo.c && touch user/unix/userinfo.lo
/bin/sh /usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/libtool 
--silent --mode=link  cc   -O2 -fno-strict-aliasing -pipe 
-I/usr/local/include/mysql -DHAVE_MYSQL_H -I/usr/include -DHAVE_CONFIG_H 
    -I./include 
-I/usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/include/arch/unix 
-I./include/arch/unix 
-I/usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr/include 
-version-info 2:12:2   -L/usr/local/lib/mysql -pthread 
-rpath=/usr/lib:/usr/local/lib -L/usr/lib -o libapr-1.la -rpath 
/usr/local/lib passwd/apr_getpass.lo strings/apr_cpystrn.lo 
strings/apr_fnmatch.lo strings/apr_snprintf.lo strings/apr_strings.lo 
strings/apr_strnatcmp.lo strings/apr_strtok.lo tables/apr_hash.lo 
tables/apr_tables.lo atomic/unix/apr_atomic.lo dso/unix/dso.lo 
file_io/unix/copy.lo file_io/unix/dir.lo file_io/unix/fileacc.lo 
file_io/unix/filedup.lo file_io/unix/filepath.lo 
file_io/unix/filepath_util.lo file_io/unix/filestat.lo 
file_io/unix/flock.lo file_io/unix/fullrw.lo file_io/unix/mktemp.lo 
file_io/unix/open.lo file_io/unix/pipe.lo file_io/unix/readwrite.lo 
file_io/unix/seek.lo file_io/unix/tempdir.lo locks/unix/global_mutex.lo 
locks/unix/proc_mutex.lo locks/unix/thread_cond.lo 
locks/unix/thread_mutex.lo locks/unix/thread_rwlock.lo 
memory/unix/apr_pools.lo misc/unix/charset.lo misc/unix/env.lo 
misc/unix/errorcodes.lo misc/unix/getopt.lo misc/unix/otherchild.lo 
misc/unix/rand.lo misc/unix/start.lo misc/unix/version.lo 
mmap/unix/common.lo mmap/unix/mmap.lo network_io/unix/inet_ntop.lo 
network_io/unix/inet_pton.lo network_io/unix/multicast.lo 
network_io/unix/sendrecv.lo network_io/unix/sockaddr.lo 
network_io/unix/sockets.lo network_io/unix/sockopt.lo poll/unix/epoll.lo 
poll/unix/kqueue.lo poll/unix/poll.lo poll/unix/port.lo 
poll/unix/select.lo random/unix/apr_random.lo random/unix/sha2.lo 
random/unix/sha2_glue.lo shmem/unix/shm.lo support/unix/waitio.lo 
threadproc/unix/proc.lo threadproc/unix/procsup.lo 
threadproc/unix/signals.lo threadproc/unix/thread.lo 
threadproc/unix/threadpriv.lo time/unix/time.lo time/unix/timestr.lo 
user/unix/groupinfo.lo user/unix/userinfo.lo   -lcrypt  -lpthread
/usr/bin/ld: /usr/lib/libpthread.a(thr_syscalls.o): relocation 
R_X86_64_32S can not be used when making a shared object; recompile with 
-fPIC
/usr/lib/libpthread.a: could not read symbols: Bad value
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.8/srclib/apr.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.8/srclib.
*** Error code 1

Stop in /usr/ports/www/apache22/work/httpd-2.2.8.
*** Error code 1

Stop in /usr/ports/www/apache22.
*** Error code 1

Stop in /usr/ports/www/apache22.
** Command failed [exit code 1]: /usr/bin/script -qa 
/tmp/portupgrade.65103.0 env make
** Fix the problem and try again.
** Listing the failed packages (-:ignored / *:skipped / !:failed)
         ! www/apache22  (coredump)



I thought devel/linuxthreads was using some old library so I tried to 
rebuild it:

# cd ../../devel/linuxthreads && make install clean # portupgrade -f 
wouldn't do anything
===>  linuxthreads-2.2.3_23 is only for i386, while you are running amd64.
*** Error code 1

Stop in /usr/ports/devel/linuxthreads.


Any ideas what to do next?
Thank you!

Sorin.


More information about the freebsd-stable mailing list