Pure-ftpd compilen met MySQL 4.1 support

Pagina: 1
Acties:

  • Snow_King
  • Registratie: April 2001
  • Laatst online: 08:59

Snow_King

Konijn is stoer!

Topicstarter
Beste Tweakers,

Ik probeer pure-ftpd 1.0.20 te compilen met MySQL 4.1 client libaries echter blijft ik de volgende error houden:

code:
1
2
checking whether mysql clients can run... no
configure: error: Your MySQL client libraries aren't properly installed


Als ik de config.log er op na sla zie ik:
code:
1
./conftest: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory


Mijn client-libaries staan in /opt/mysql41 geïnstalleerd.

Zowel PHP4 als PHP5 compilen hier probleemloos mee.

Als ik een symlink maak van /usr/lib/libmysqlclient.so.14 naar /opt/mysql41/lib/mysql/libmysqlclient.so.14 dan gaat de configure goed, echter vind ik dat niet de oplossing.

Als ik /opt/mysql41/lib/mysql toevoeg aan /etc/ld.so.conf en dan ldconfig run dan gaat het compilen goed.

Nu heb ik de volgende configures geprobeerd, echter falen ze allemaal.
code:
1
2
3
4
5
6
7
8
9
10
11
12
./configure --prefix=/opt/pureftpd \
--with-mysql \
--with-ratios \
--with-quotas \
--with-boring \
--without-banner \
--without-shadow \
--with-altlog \
--with-ftpwho \
--with-cookie \
LDFLAGS="-L/opt/mysql41/lib/mysql" \
CPPFLAGS="-I/opt/mysql41/include/mysql"


code:
1
2
3
4
5
6
7
8
9
10
./configure --prefix=/opt/pureftpd \
--with-mysql=/opt/mysql41 \
--with-ratios \
--with-quotas \
--with-boring \
--without-banner \
--without-shadow \
--with-altlog \
--with-ftpwho \
--with-cookie


Nu moet er volgens mij een mogelijkheid zijn om bepaalde env vars mee te geven bij het compilen en op die manier er voor te zorgen dat libmysqlclient.so.14 gevonden wordt.

Google en mailinglists signaleren de zelfde problemen en komen uiteindelijk allemaal uit op symlink, dat wil ik dus niet.

/opt staat namelijk via NFS gedeeld en ongeveer 10 clients maken er gebruik van, ik wil niet op elke client die symlink gaan aanleggen óf de ld.so.conf aanpassen.

Wie o wie weet dat er hier fout gaat?

[ Voor 9% gewijzigd door Snow_King op 08-12-2005 18:15 ]


  • Blaasvis
  • Registratie: November 2001
  • Laatst online: 13:48

Blaasvis

Cidora \o/

ik heb even voor je in de configure.ac gekeken.
Het is duidelijk dat ze alles hard coded er in hebben gezet.
probeer de paths daar eens netjes te laten verwijzen naar je eigen prefix ?

Freedom is everything you need ; <moto-moi|afk> ik verkloot het gewoon nooit :P


  • Snow_King
  • Registratie: April 2001
  • Laatst online: 08:59

Snow_King

Konijn is stoer!

Topicstarter
Blaasvis schreef op vrijdag 09 december 2005 @ 09:44:
ik heb even voor je in de configure.ac gekeken.
Het is duidelijk dat ze alles hard coded er in hebben gezet.
probeer de paths daar eens netjes te laten verwijzen naar je eigen prefix ?
Je doelt op dit stuk denk ik?

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
AC_ARG_WITH(mysql,
[AS_HELP_STRING(--with-mysql,Users database is a MySQL database (see doc))],
[ if test "x$withval" != "xno" ; then
    if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
      LD_RUN_PATH="${withval}/lib${LD_RUN_PATH:+:}${LD_RUN_PATH}"
      LDFLAGS="$LDFLAGS -L${withval}/lib -L${withval}/lib/mysql -L${withval}/mysql/lib"
      CPPFLAGS="$CPPFLAGS -I${withval}/include -I${withval}/include/mysql -I${withval}/mysql/include"
    else
      LD_RUN_PATH="[b]/opt/mysql41/lib/mysql[/b]:/usr/local/mysql/lib/mysql:/usr/lib/mysql:/usr/mysql/lib:/usr/mysql/lib/mysql:/usr/l
ocal/lib/mysql:${LD_RUN_PATH:+:}${LD_RUN_PATH}"
      LDFLAGS="$LDFLAGS -L[b]/opt/mysql41/lib/mysql[/b] -L/usr/lib/mysql -L/usr/mysql/lib -L/usr/local/lib/mysql -L/usr/local/mysql/l
ib/mysql -L/usr/mysql/lib/mysql"
      CPPFLAGS="$CPPFLAGS -I[b]/opt/mysql41/include/mysql[/b] -I/usr/include/mysql -I/usr/mysql/include -I/usr/local/include/mysql -I
/usr/local/mysql/include/mysql -I/usr/mysql/include/mysql"
    fi
    AC_CHECK_LIB(m, floor)
    AC_CHECK_LIB(z, gzclose)
    with_mysql="yes"
    AC_DEFINE(WITH_MYSQL,,[with mysql])
    AC_CHECK_LIB(mysqlclient, mysql_init, ,
      [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)])
    AC_MSG_CHECKING(whether mysql clients can run)
    AC_RUN_IFELSE([AC_LANG_SOURCE([[
      #include <stdio.h>
      #include <mysql.h>
      int main(void)
      {
          MYSQL *a = mysql_init(NULL);
          return 0;
      }
      ]])],[],[
        AC_MSG_RESULT(no)
        AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)

    ],[])
    AC_MSG_RESULT(yes)
    AC_CHECK_FUNCS(mysql_real_escape_string)
  fi ])


Het vet gedrukte pad heb ik gewijzigd, echter zonder resultaat.

EDIT: Vergedrukt werkt niet in [ c o d e ] blokken, zie [ b ] en [ / b ]

[ Voor 13% gewijzigd door Snow_King op 09-12-2005 10:31 ]


  • ripperke
  • Registratie: Augustus 2003
  • Laatst online: 15-10-2025

ripperke

w00t!

kan je niet gewoon doen: ?
code:
1
./configure --with-mysql=/opt/mysql41/lib/mysql


als ik ./configure --with-mysql=/bogus run kan hij mysql ook niet vinden, dus ik denk dat je gewoon een path kan meegeven (ookal staan het niet in help) aan --with-mysql

If TCP/IP handshaking was less formal, perhaps SYN/ACK would be YO/WASSUP


  • Snow_King
  • Registratie: April 2001
  • Laatst online: 08:59

Snow_King

Konijn is stoer!

Topicstarter
ripperke schreef op vrijdag 09 december 2005 @ 10:37:
kan je niet gewoon doen: ?
code:
1
./configure --with-mysql=/opt/mysql41/lib/mysql


als ik ./configure --with-mysql=/bogus run kan hij mysql ook niet vinden, dus ik denk dat je gewoon een path kan meegeven (ookal staan het niet in help) aan --with-mysql
Dat doe ik ook, zie mijn twee configures die ik daar boven post.

Ook de configure.ac aanpassen naar onderstaande werkt niet.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
AC_ARG_WITH(mysql,
[AS_HELP_STRING(--with-mysql,Users database is a MySQL database (see doc))],
[ if test "x$withval" != "xno" ; then
    if test "x$withval" != "x" && test "x$withval" != "xyes" ; then
      LD_RUN_PATH="/opt/mysql41/lib/mysql"
      LDFLAGS="-L/opt/mysql41/lib/mysql"
      CPPFLAGS="-I/opt/mysql41/include/mysql"
    else
      LD_RUN_PATH="/opt/mysql41/lib/mysql"
      LDFLAGS="-L/opt/mysql41/lib/mysql"
      CPPFLAGS="-I/opt/mysql41/include/mysql"
    fi
    AC_CHECK_LIB(m, floor)
    AC_CHECK_LIB(z, gzclose)
    with_mysql="yes"
    AC_DEFINE(WITH_MYSQL,,[with mysql])
    AC_CHECK_LIB(mysqlclient, mysql_init, ,
      [AC_MSG_ERROR(libmysqlclient is needed for MySQL support)])
    AC_MSG_CHECKING(whether mysql clients can run)
    AC_RUN_IFELSE([AC_LANG_SOURCE([[
      #include <stdio.h>
      #include <mysql.h>
      int main(void)
      {
          MYSQL *a = mysql_init(NULL);
          return 0;
      }
      ]])],[],[
        AC_MSG_RESULT(no)
        AC_MSG_ERROR(Your MySQL client libraries aren't properly installed)

    ],[])
    AC_MSG_RESULT(yes)
    AC_CHECK_FUNCS(mysql_real_escape_string)
  fi ])


De config.log

code:
1
2
3
4
5
6
7
8
9
10
11
configure:19983: $? = 0
configure:19986: test -s conftest
configure:19989: $? = 0
configure:20002: result: yes
configure:20017: checking whether mysql clients can run
configure:20043: gcc -o conftest -g -O2  -D_GNU_SOURCE=1 -I/usr/local/include -I/opt/mysql41/include -I/opt/mysql41/include/mysql -I/opt/mysql41/mysql/include  -L/usr/local/lib -L/opt/mysql41/lib -L/opt/mysql41/lib/mysql -L/opt/mysql41/mysql/lib conftest.c -lmysqlclient -lz -lm -lcrypt  >&5
configure:20046: $? = 0
configure:20048: ./conftest
./conftest: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory
configure:20051: $? = 127
configure: program exited with status 127

[ Voor 23% gewijzigd door Snow_King op 09-12-2005 10:46 ]


  • Blaasvis
  • Registratie: November 2001
  • Laatst online: 13:48

Blaasvis

Cidora \o/

.ac staat voor autoconf...
nu kun je twee dingen doen:

1) autoconf draaien
2) de configure aanpassen.

Dit is mijn fout ik was net wakker ;)

Freedom is everything you need ; <moto-moi|afk> ik verkloot het gewoon nooit :P


  • Snow_King
  • Registratie: April 2001
  • Laatst online: 08:59

Snow_King

Konijn is stoer!

Topicstarter
Heel vreemd dit.

Op een andere bak staat in /opt/mysql de MySQL 4.1 server geïnstalleerd. Op die bak configure'd pure-ftpd wel in 1x.

Dus ik compile in /opt/mysql41 met _exact_ de zelfde configure regels de mysql41 client en verrek, de zelfde error als op die andere bak.

Pure-ftpd compiled dus wel out-of-the-box met mysql 4.1 server (zolang je juiste pad maar opgeeft).

Maar als je alleen de client geïnstalleerd hebt, dan moet je toch echt het pad van libmysqlclient.so.14 toevoegen aan je ld.so.conf en daarna ldconfig runnen.
Pagina: 1