|
|
#1 |
|
Triple-A Player
Join Date: Jan 2002
Location: Wantagh, NY
Posts: 75
|
MySQL problems
Let me start off by saying I am completely new to MySQL. I am trying to set up a bullutin board system that relies on PHP and MySQL. So i figure I would follwo the directions in this months Macworld to set up the MySQL server. I downloaded the package installer from www.entropy.ch/macosx/mysql and installed it and followed al the directions on the page. When i get to the step where it says to type "./bin/mysql test" i get this:
Code:
alex% ./bin/mysql test dyld: ./bin/mysql Undefined symbols: ./bin/mysql undefined reference to _BC expected to be defined in /usr/lib/libSystem.B.dylib ./bin/mysql undefined reference to _PC expected to be defined in /usr/lib/libSystem.B.dylib ./bin/mysql undefined reference to _UP expected to be defined in /usr/lib/libSystem.B.dylib Trace/BPT trap Thanks in advance!Alex |
|
|
|
|
|
#2 |
|
Major Leaguer
Join Date: Oct 2002
Posts: 268
|
I have had this problem before. Unfortunately, the workaround I've seen (and got to work) is to download the sources and recompile the mysql client.
Get the source for the latest mysql 3.23 release (http://www.mysql.com/Downloads/mysql...3.23.53.tar.gz). Open it with stuffit or, from a terminal command line with gunzip mysql-3.23.53.tar.gz tar xvf mysql-3.23.53.tar Then, go into the new directory/folder created cd mysql-3.23.53 and edit the file configure. In configure, there is a section of code that looks like: *darwin*) if test "$ac_cv_c_compiler_gnu" = "yes" then CFLAGS="$CFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ" CXXFLAGS="$CXXFLAGS -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ" MAX_C_OPTIMIZE="-O" fi ;; You should add the line with_named_curses="-ltermcap" immediately before fi ;; Save and exit. From the terminal command line, do ./configure make (wait for a while... hopefully you won't get any fatal errors) sudo make install (this will prompt you for your admin password...) A lot of this information has been taken from http://www.entropy.ch/software/macosx/mysql/ and groups.google.com (search for mysql mac os x libsystem.b.dylib). I did this and it worked for me! Hope this helps. Eric |
|
|
|
|
|
#3 |
|
Triple-A Player
Join Date: Jan 2002
Location: Wantagh, NY
Posts: 75
|
OK, I've never built from source before so bear with me here. And btw this is purely for my own knowledge, Its not any kind of emergency at all :-)
So I changed into the source directory added that line, saved the save, then typed ./configure and it eventually gives me an error, I'll post the last few lines befoer the error in case it helps: checking for off_t... no checking for struct stat.st_rdev... no checking whether time.h and sys/time.h may both be included... no checking whether struct tm is in sys/time.h or time.h... sys/time.h checking for char... no checking size of char... 0 configure: error: No size for char type. A likely cause for this could be that there isn't any static libraries installed. You can verify this by checking if you have libm.a in /lib, /usr/lib or some other standard place. If this is the problem, install the static libraries and try again. If this isn't the problem, examine config.log for possible errors. If you want to report this, use 'scripts/mysqlbug' and include at least the last 20 rows from config.log! Any ideas? Thanks so much! Alex |
|
|
|
|
|
#4 |
|
Major Leaguer
Join Date: Oct 2002
Posts: 268
|
Did you install the developer's CD? That will have a lot of system libraries and header files that are required to build software. I got a copy when I bought my iBook this spring. If you don't have it, you can get it from the developers page at apple.com.
Oh, and btw... I may have Unix experience, but I had never built mysql before... if that's any consolation! Eric |
|
|
|
|
|
#5 |
|
Triple-A Player
Join Date: Jan 2002
Location: Wantagh, NY
Posts: 75
|
I ended up doing a clean install of my system, this was the little annying problem that put me over the edge.
So the package install worked perfectly ont he clean system. Thanks for your help!Alex |
|
|
|
|
|
#6 |
|
Prospect
Join Date: Sep 2002
Location: London, UK.
Posts: 34
|
I've been trying to compile/make mysql from the above for the last hour, but seemingly keep getting errors on the make command.
Anyway, went to groups.google.com as ericw13 suggested... seems to be a few more instructions in case the first didn't work. Unfortunately, no luck... anyone? I'm here because the entropy version didn't work for me, even after a complete system clean install!
|
|
|
|
|
|
#7 |
|
Major Leaguer
Join Date: Oct 2002
Posts: 268
|
c-o2:
What are the errors? Eric |
|
|
|
|
|
#8 |
|
Prospect
Join Date: Sep 2002
Location: London, UK.
Posts: 34
|
Phew, well here's a snippet:
g++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DHAVE_CONFIG_H -I./../include -I./../regex -I. -I../include -I.. -I. -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -c sql_class.cc ... please don't tell me these aren't errors! ![]() ... I'm getting hundreds of lines like this. |
|
|
|
|
|
#9 |
|
Major Leaguer
Join Date: Oct 2002
Posts: 268
|
Well, I'd like to tell you those are errors, but sadly no. That's all just various options being passed to the C compiler (g++).
Errors will say Error. Warnings will say Warning (a lot of which you can safely ignore). If you get nothing more than a bunch of g++.... lines like that, then some ld lines (linking all of your object files together), you'll be fine. Believe me, make will stop with ***Fatal error if it runs into problems. Eric |
|
|
|
|
|
#10 |
|
Prospect
Join Date: Sep 2002
Location: London, UK.
Posts: 34
|
cheers eric
did I say I'm no expert at Unix? Ok, back to the terminal... this change over to Jaguar really knocked my Unix knowledge back! |
|
|
|
|
|
#11 |
|
Major Leaguer
Join Date: Oct 2002
Posts: 268
|
That's ok... I'm no expert at Mac... just look for me posting Mac questions and help me out too...!
Eric |
|
|
|
![]() |
|
|