Stefan Winter wrote:
Did that; the build now descended into the subdir, but choked over one thing:
CC src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:40:27: error: mysql_version.h: No such file or directory src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:41:20: error: errmsg.h: No such file or directory src/modules/rlm_sql/drivers/rlm_sql_mysql/sql_mysql.c:42:19: error: mysql.h: No such file or directory
My headers are installed just fine, but in a mysql/ subdir. According to the code, this *should* be detected by configure and
Except the "configure" script doesn't create rlm_sql_mysql/all.mk. You did. You've got to add in the correct CFLAGS. See the Makefile in that directory for details.
I fixed that in the code (removing ifdefs) and carried on; but would be nice if the build system would figure itself out.
The old build system does figure that out. The new one doesn't, because not all of the modules have been converted over yet.
In all.mk, I added hardcoded
TGT_LDLIBS = -lmysqlclient -lmysqlservices -lmygcc
This list really should be taken from the Makefile in that directory.
which allowed the build to go through (I guess configure should take care of that at some point). rlm_sql_mysql.so and friends are in the build's lib/ subdir, but still, the binary won't start:
If you're running it from the build directory, you need to set LD_LIBRARY_PATH. The need to set that is some of the reason why libtool has such deep and bizarre magic.
This is now going beyond my knowledge of lib-magic.
You should be able to just do "make install". The new make system automatically tracks dependencies all the way through to installed files. So change one C file, do "make install", and one file gets re-built and re-installed. Very nice. There are some caveats, the "raddb" directory hasn't been updated to use the new build system. So you'll have to handle that manually. If it's too much of a pain, just use the old build system. It's extremely slow, but it works. Alan DeKok.