[ts-gen] (Apple OS/X) mysql library installation incorrect?

R P Herrold herrold at owlriver.com
Sun Sep 2 12:12:09 EDT 2007


As noted in the prior piece, which swas composed earlier this 
week, Bill and I have been working on getting the OS/X build 
going. I did a reinstall last week of unit to test the 070831 
candidate at the FTP site.

Bottom line:  it seems to compile with a bit of effort as to 
conforming path expectations.

On Fri, 31 Aug 2007, Bill Pippin wrote:

> I find libraries in both of the following directories, and 
> the make succeeds with either directory as the -L flag:
>
> /usr/local/mysql/lib
> /usr/local/mysql-5.0.45-osx10.4-powerpc/lib
>
> However, the dynamic loader disagress with ld about the 
> path; it believes the library should be a directory deeper, 
> at /usr/local/mysql/lib/mysql.

I get the same results ... I have added a fixup path thus:

cd /usr/local/mysql/lib
sudo mkdir mysql
cd mysql
sudo ln -s ../* .

and editted the Makefile for the Apple unit:

LIB       = -L/usr/local/mysql -lmysqlclient \
   	-L/usr/local/mysql/lib

-----------------------------------------

No question that there is something different in expectations 
of the dynaloader here.  As you suggest, the Apple approach to 
this is again to 'think different', and to our way of thinking 
from the Linux workd, to imply that the  'mysql library 
installation [is] incorrect'.

Clearly this is something we'll learn more on as time passes, 
and I wish to document, and to be careful to not add _too 
many_ Linuxisms as to our expectations, so that we can leave a 
relatively clean slate to erase when we are assisted in 
knowing the 'correct' Apple approach.

==============================

The market is of course closed, but I think we have progress 
here.

emac:~/shim/shim-070831 herrold$ make clean
emac:~/shim/shim-070831 herrold$ time make all
make -j4  shim
g++ -Wall -g -I/usr/include/mysql  -c -o mode.o src/mode.c
g++ -Wall -g -I/usr/include/mysql  -c -o data.o src/data.c
g++ -Wall -g -I/usr/include/mysql  -c -o once.o src/once.c
g++ -Wall -g -I/usr/include/mysql  -c -o bind.o src/bind.c
g++ -Wall -g -I/usr/include/mysql  -c -o type.o src/type.c
g++ -Wall -g -I/usr/include/mysql  -c -o tabs.o src/tabs.c
g++ -Wall -g -I/usr/include/mysql  -c -o rule.o src/rule.c
g++ -Wall -g -I/usr/include/mysql  -c -o dfsa.o src/dfsa.c
g++ -Wall -g -I/usr/include/mysql  -c -o syms.o src/syms.c
g++ -Wall -g -I/usr/include/mysql  -c -o help.o src/help.c
g++ -Wall -g -I/usr/include/mysql  -c -o talk.o src/talk.c
g++ -Wall -g -I/usr/include/mysql  -c -o init.o src/init.c
g++ -Wall -g -I/usr/include/mysql  -c -o link.o src/link.c
g++ -Wall -g -I/usr/include/mysql  -c -o load.o src/load.c
g++ -Wall -g -I/usr/include/mysql  -c -o bulk.o src/bulk.c
g++ -Wall -g -I/usr/include/mysql  -c -o shim.o src/shim.c
g++ -Wall -g -I/usr/include/mysql  -c -o wait.o src/wait.c
g++ -Wall -g -I/usr/include/mysql  -c -o time.o src/time.c
g++ -Wall -g -I/usr/include/mysql  -c -o read.o src/read.c
g++ -Wall -g -I/usr/include/mysql  -c -o flow.o src/flow.c
g++ -Wall -g -I/usr/include/mysql  -c -o exec.o src/exec.c
g++ -Wall -g -I/usr/include/mysql  -c -o feed.o src/feed.c
g++ -Wall -g -I/usr/include/mysql  -c -o send.o src/send.c
g++ -Wall -g -I/usr/include/mysql  -c -o post.o src/post.c
g++ -Wall -g -I/usr/include/mysql  -c -o echo.o src/echo.c
g++ -Wall -g -I/usr/include/mysql  -c -o calc.o src/calc.c
g++ -Wall -g -I/usr/include/mysql  -c -o name.o src/name.c
g++ -Wall -g -I/usr/include/mysql  -c -o leaf.o src/leaf.c
g++ -Wall -g -I/usr/include/mysql  -c -o atom.o src/atom.c
g++ -Wall -g -I/usr/include/mysql  -c -o term.o src/term.c
g++ -Wall -g -I/usr/include/mysql  -c -o tilt.o src/tilt.c
g++ -Wall -g -I/usr/include/mysql  -c -o pool.o lib/pool.c
g++ -Wall -g -I/usr/include/mysql  -c -o hash.o lib/hash.c
g++ -Wall -g -I/usr/include/mysql  -c -o wrap.o lib/wrap.c
g++ -Wall -g -I/usr/include/mysql  -c -o text.o lib/text.c
g++ -Wall -g -I/usr/include/mysql  -c -o fork.o lib/fork.c
g++ -Wall -g -I/usr/include/mysql  -c -o inet.o lib/inet.c
g++ -Wall -g -I/usr/include/mysql  -c -o boot.o lib/boot.c
g++ -Wall -g -I/usr/include/mysql  -c -o else.o src/else.c
g++ -Wall -g -I/usr/include/mysql  -c -o unit.o src/unit.c
date;   g++ -g -o shim once.o bind.o mode.o data.o type.o 
tabs.o rule.o dfsa.o syms.o help.o talk.o init.o link.o load.o 
bulk.o shim.o wait.o time.o read.o flow.o exec.o feed.o send.o 
post.o echo.o calc.o name.o leaf.o atom.o term.o tilt.o pool.o 
hash.o text.o wrap.o inet.o fork.o boot.o else.o unit.o 
-L/usr/local/mysql -lmysqlclient -L/usr/local/mysql/lib -lm
Sun Sep  2 12:13:20 EDT 2007

real    3m52.282s
user    3m11.555s
sys     0m34.902s

emac:~/shim/shim-070831 herrold$ ./shim --help

Usage: shim <mode> [optional feature list]
Modes:

       --help     # print this explanation and list the optional features

                  # real modes, requiring access to an IB tws:
       --data     # process subscriptions and log resulting tick stream events
       --risk     # accept full command set, send requests, and log all events

                  # test modes, with no connection to the tws:
       --play     # read events from the image file and send text to stdout
       --unit     # for internal use; unstable though otherwise harmless

                  # Options may be listed following the mode.
                  # help mode only:
         cmds     # describe the syntax and semantics of the shim 
commands

                  # real modes; the output options write all events to the:
         file     # file with name also the ShimText name-value pair value
         cout     # standard output -- warning, sprays all over the screen
         logd     # system logger, to provide routing via /etc/syslog.conf
                  # output options may be combined and file is the default

                  # other real mode options:
         init     # prompt for the dbms and link commands during startup
         pane     # pop a konsole windowpane to scroll cmds, reqs and msgs
         load     # load SubRequest at startup even without a load command
         save     # cmds-reqs-msgs image file partition for later playback

                  # test mode only:
         fast     # cut startup time; this saves just one second, works with
                  # Linux only, and is used primarily to speedup the offline
                  # parts of the test suite
emac:~/shim/shim-070831 herrold$ ./shim --data
Now: 1188749615      44015 1188705600 1188705600
x86 /proc/cpuinfo: 0;
time stamp clocks: 24883363
      4   3   6   3   4   3   3   4   3   3   5   4   3   3   4 
3   3   3   4   4   3   3   4   3   3   3   7   4   3   3   4 
3   3   3   4   4   3   3   4   3   3   3   4   4   3   3   4 
3   3   3   4   4   3   3   4   3   3   3   4   4   3   3   4 
3   3   3   4   4   3   3   4   3   3   3   4   4   3   3   4 
3   3   3   8   3   3   4   3   3   3   4   5   3   3   4   3 
3   4   3   4   3
x86 /proc/cpuinfo: 24
time stamp clocks: 24, 24000 1

An attempt to connect to the database [testing] on [localhost] 
as user [shim]
failed; you may need to create it, start the server, or 
provide appropriate
login info.

mysql_real_connect() failed

terminate called after throwing an instance of 
'TradingShimDaemon1_0::TradingException::my_sql_initialize_failure'
Abort trap
emac:~/shim/shim-070831 herrold$ uname -a ; g++ --version
Darwin emac.first.lan 8.10.0 Darwin Kernel Version 8.10.0: Wed 
May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC 
Power Macintosh powerpc
powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, 
Inc. build 5370)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. 
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A 
PARTICULAR PURPOSE.

emac:~/shim/shim-070831 herrold$


More information about the ts-general mailing list