build on PPC64 fails
Hi! I can't build free-radius CVS on a PPC64 RHAS 4.0 . $ ./configure stage is OK. $ make stage fails on rlm_mysql ... gcc -shared .libs/sql_mysql.o -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz -m64 -mminimal-toc -Wl,-soname -Wl,rlm_sql_mysql-1.1.0-pre0.so -o .libs/rlm_sql_mysql-1.1.0-pre0.so /usr/bin/ld: cannot find -lmysqlclient collect2: ld returned 1 exit status ... ... As far as I understnad situation, the RHAS PPC64 is a bi-standart system (32- and 64-bit) so the "libmysqlclient.a" **library** on the RHAS PPC64 resides in the "/usr/lib/mysql/" folder. The "/usr/lib64/mysql/" contains a *.so objects only, without *.a. [root@tr radiusd]# ls -la /usr/lib/mysql/libmysqlclient.a -rw-r--r-- 1 root root 1262082 Nov 24 2004 /usr/lib/mysql/libmysqlclient.a [root@tr radiusd]# ls -la /usr/lib64/mysql/libmysqlclient.a ls: /usr/lib64/mysql/libmysqlclient.a: No such file or directory Is it possible to correct a ./configure script ? -- -=AV=-
"Alexander Voropay" <alec@artcoms.ru> wrote:
I can't build free-radius CVS on a PPC64 RHAS 4.0 .
As far as I understnad situation, the RHAS PPC64 is a bi-standart system (32- and 64-bit)
This fearule is caled "multilib" and exists on AMD64, PPC64, SPARC64 MIPS64 e.t.c. Only rlm_mysql is affected by this bug. Another modules are OK. I've run ./configure --target=ppc : ... configure: configuring in ./drivers/rlm_sql_mysql configure: running /bin/sh './configure' --prefix=/usr/local '--prefix=/usr/local' '--target=ppc' 'target_alias=ppc' '--enable-ltdl-install=no' '--cache-file=/dev/null' '--srcdir=.' 'CFLAGS=-g -O2 -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DOPENSSL_NO_KRB5' 'CPPFLAGS=' 'LDFLAGS=' --cache-file=/dev/null --srcdir=. checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ANSI C... none needed checking how to run the C preprocessor... gcc -E checking for mysql_config... yes configure: creating ./config.status config.status: creating Makefile config.status: creating config.h config.status: config.h is unchanged It creates *wrong* Makefile : ==== src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile ====== include ../../../../../Make.inc TARGET = rlm_sql_mysql SRCS = sql_mysql.c RLM_SQL_CFLAGS = -I/usr/include/mysql -g -pipe -m64 -fsigned-char -mminimal-toc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $(INCLTDL) RLM_SQL_LIBS = -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz include ../rules.mak ======================================== Note "-m64" and "-L/usr/lib64/mysql" flags. It works OK if delete "-m64" and replace "/usr/lib64" with "/usr/lib" -- -=AV=-
"Alexander Voropay" <alec@artcoms.ru> wrote:
It creates *wrong* Makefile :
==== src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile ====== = -I/usr/include/mysql -g -pipe -m64 -fsigned-char -mminimal-toc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE RLM_SQL_LIBS = -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz ========================================
Note "-m64" and "-L/usr/lib64/mysql" flags.
It works OK if delete "-m64" and replace "/usr/lib64" with "/usr/lib"
I've found a source of this problem. On the RHAS PPC64, the MySQL is a 64-bit application and returns this options on request : $ mysql_config --cflags -I/usr/include/mysql -g -pipe -m64 -fsigned-char -mminimal-toc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $ mysql_config --libs -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz FreeRADIUS's ./configure script shouldn't trust so much to the `mysql_config` data... -- -=AV=-
On Fri, Jun 03, 2005 at 12:10:03PM +0400, Alexander Voropay wrote:
"Alexander Voropay" <alec@artcoms.ru> wrote:
It creates *wrong* Makefile :
==== src/modules/rlm_sql/drivers/rlm_sql_mysql/Makefile ====== = -I/usr/include/mysql -g -pipe -m64 -fsigned-char -mminimal-toc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE RLM_SQL_LIBS = -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz ========================================
Note "-m64" and "-L/usr/lib64/mysql" flags.
It works OK if delete "-m64" and replace "/usr/lib64" with "/usr/lib"
I've found a source of this problem.
On the RHAS PPC64, the MySQL is a 64-bit application and returns this options on request :
$ mysql_config --cflags -I/usr/include/mysql -g -pipe -m64 -fsigned-char -mminimal-toc -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
$ mysql_config --libs -L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz
FreeRADIUS's ./configure script shouldn't trust so much to the `mysql_config` data...
mysql_config is part of the client libraries, not the application. If you've got both 32 and 64-bit development headers installed, then try removing the 64-bit ones, and see if mysql_config returns the right values. This is a problem with systems that support mixed libraries, which wasn't forseen when the whole *_config thing was put together, I suspect. -- Paul "TBBle" Hampson, on an alternate email client.
"Alexander Voropay" <alec@artcoms.ru> wrote:
FreeRADIUS's ./configure script shouldn't trust so much to the `mysql_config` data...
So what *should* it trust? It can't invent anything, it has to go with what the system tells it. And if the system is confused, so is the configure script. Alan DeKok.
participants (3)
-
Alan DeKok -
Alexander Voropay -
Paul.Hampson@PObox.com