[Monetdb-developers] MonetDB on Darwin/ARM
With a bit of hacking in the C compiler, and doing a variety of --enable-shared vs --disabled-shared I am able to come up to this point: iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mserver5 !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory # MonetDB server v5.11.0, based on kernel v1.29.0 # Serving database 'demo', using 1 thread # Compiled for arm-apple-darwin/32bit with 32bit OIDs dynamically linked # Copyright (c) 1993-July 2008 CWI. # Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved # Visit http://monetdb.cwi.nl/ for further information #warning: please don't forget to set your vault key! #(see /Applications/MonetDB.app/etc/monetdb5.conf) !ERROR: GDKremovedir: rmdir(bat/DELETE_ME) failed. !OS: Directory not empty !ERROR: GDKremovedir: rmdir(bat/DELETE_ME) failed. !OS: Directory not empty !ERROR: BBPsync: rename(bat/BACKUP/SUBCOMMIT,bat/DELETE_ME) failed. #WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace #WARNING: LoaderException:loadLibrary:optimizer: file not found #WARNING: LoaderException:loadLibrary:run_isolate: file not found #WARNING: LoaderException:loadLibrary:run_memo: file not found #WARNING: LoaderException:loadLibrary:run_octopus: file not found #WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ Bus error All this was compiled using a cross compiler, because I didn't trust gdkscanselect compiling to the device. If someone sees from the above output where I should start looking, I'm happy to take a peak there, my guess is some chdir gets wrong. I was a bit minimalistic with compiling; but mclient works ;) [without readline] iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mclient -lsql -h 192.168.1.2 select * from tables; % .tables, .tables, .tables, .tables, .tables, .tables, .tables, .tables # table_name % id, name, schema_id, query, type, system, commit_action, temporary # name % int, varchar, int, varchar, smallint, boolean, smallint, tinyint # type % 4, 29, 4, 168, 1, 5, 1, 1 # length [ 1062, "schemas", 1061, NULL, 0, true, 0, 0 ] [ 1067, "types", 1061, NULL, 0, true, 0, 0 ] [ 1076, "functions", 1061, NULL, 0, true, 0, 0 ] [ 1085, "args", 1061, NULL, 0, true, 0, 0 ] ..... Stefan
MonetDB under Darwin/ARM on an iPod --- would you donate that for our testing pool/farm? ... ;-) Anyway, to give any help or make any guesses about what the problem might be, we'd at least need to know, how exactly you managed to cross-compile MonetDB for that system: - host/build systems used - cross-compiler used - libraries used for cross-compiling on host/build systems - libraries available on target system (iPod) - exact configure call (incl. related settings of environment variables) - any source code changes applied? - console output and config.log of configure - console output of make Further, I assume that the default dbfarm (cf., monetdb5.conf --- from the welcome message I guess it might be "/Applications/MonetDB.app/var/MonetDB5/dbfarm") exists, or at least your mserver5 is allowed to create it in that location ... If not, you might what to specify a different "usable" dbfarm in your monetdb5.conf or using --dbfarm= on the mserver5 command line. I also assume that all libraries used during cross-compilation are also available on the iPod, and in a location the MonetDB and/or the system loaded know where to find them; otherwise, you might need to set LD_LIBRARY_PATH and/or DYLD_LIBRARY_PATH accordingly. (Note: With MonetDB4 configuring with "--disable-shared --enable-static" means that MonetDB modules a statically linked into the server as opposed to dynamically loaded at runtime; system libraries are never linked statically. With MonetDB5, configure options "--disable-shared --enable-static" should have no effect, i.e., MonetDB5 does no longer / not yet (?) support static linking of MonetDB modules into the server. ) Stefan
With a bit of hacking in the C compiler, and doing a variety of --enable-shared vs --disabled-shared I am able to come up to this point:
iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mserver5 !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory !ERROR: BBPdiskscan: stat(bat/)!OS: No such file or directory # MonetDB server v5.11.0, based on kernel v1.29.0 # Serving database 'demo', using 1 thread # Compiled for arm-apple-darwin/32bit with 32bit OIDs dynamically linked # Copyright (c) 1993-July 2008 CWI. # Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved # Visit http://monetdb.cwi.nl/ for further information #warning: please don't forget to set your vault key! #(see /Applications/MonetDB.app/etc/monetdb5.conf) !ERROR: GDKremovedir: rmdir(bat/DELETE_ME) failed. !OS: Directory not empty !ERROR: GDKremovedir: rmdir(bat/DELETE_ME) failed. !OS: Directory not empty !ERROR: BBPsync: rename(bat/BACKUP/SUBCOMMIT,bat/DELETE_ME) failed. #WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace
#WARNING: LoaderException:loadLibrary:optimizer: file not found #WARNING: LoaderException:loadLibrary:run_isolate: file not found #WARNING: LoaderException:loadLibrary:run_memo: file not found #WARNING: LoaderException:loadLibrary:run_octopus: file not found #WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace
# Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ Bus error
All this was compiled using a cross compiler, because I didn't trust gdkscanselect compiling to the device. If someone sees from the above output where I should start looking, I'm happy to take a peak there, my guess is some chdir gets wrong.
I was a bit minimalistic with compiling; but mclient works ;) [without readline]
iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mclient -lsql -h 192.168.1.2 select * from tables; % .tables, .tables, .tables, .tables, .tables, .tables, .tables, .tables # table_name % id, name, schema_id, query, type, system, commit_action, temporary # name % int, varchar, int, varchar, smallint, boolean, smallint, tinyint # type % 4, 29, 4, 168, 1, 5, 1, 1 # length [ 1062, "schemas", 1061, NULL, 0, true, 0, 0 ] [ 1067, "types", 1061, NULL, 0, true, 0, 0 ] [ 1076, "functions", 1061, NULL, 0, true, 0, 0 ] [ 1085, "args", 1061, NULL, 0, true, 0, 0 ] .....
Stefan
------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On 03-05-2009 06:48:53 +0200, Stefan de Konink wrote:
#WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace
Looks like you have a mismatch in libSystem.B.dylib or something. Are you sure you compiled your cross against an updated SDK? Use `otool -L` where you're linking against.
Hi Fabian, Fabian Groffen wrote:
On 03-05-2009 06:48:53 +0200, Stefan de Konink wrote:
#WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace
Looks like you have a mismatch in libSystem.B.dylib or something. Are you sure you compiled your cross against an updated SDK? Use `otool -L` where you're linking against.
I just found out how to do it in the toolchain; arm-apple-darwin-otool -L /Applications/MonetDB.app/bin/mserver5 /Applications/MonetDB.app/bin/mserver5: /Applications/MonetDB.app/lib/libmonetdb5.5.dylib (compatibility version 17.0.0, current version 17.0.0) /Applications/MonetDB.app/lib/libbat.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libstream.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libmutils.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.10) /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) otool -L /Applications/MonetDB.app/bin/mserver5 /Applications/MonetDB.app/bin/mserver5: /Applications/MonetDB.app/lib/libmonetdb5.5.dylib (compatibility version 17.0.0, current version 17.0.0) /Applications/MonetDB.app/lib/libbat.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libstream.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libmutils.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.10) /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) Looks equal. Anyway, I'll recompile the toolchain later today... I see that iconv, libxml2 and readline are present on the iPod aswell so I'll try to make use of it, saves space. Maybe even attempt to compile it on the device. Stefan
Hi Fabian,
Fabian Groffen wrote:
On 03-05-2009 06:48:53 +0200, Stefan de Konink wrote:
#WARNING: LoaderException:loadLibrary:mmath: loader error dlopen(/Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib, 10): Symbol not found: ___fpclassifyd Referenced from: /Applications/MonetDB.app/lib/MonetDB5/lib/lib_mmath.dylib Expected in: flat namespace
Looks like you have a mismatch in libSystem.B.dylib or something. Are you sure you compiled your cross against an updated SDK? Use `otool -L` where you're linking against.
I just found out how to do it in the toolchain;
arm-apple-darwin-otool -L /Applications/MonetDB.app/bin/mserver5 /Applications/MonetDB.app/bin/mserver5: /Applications/MonetDB.app/lib/libmonetdb5.5.dylib (compatibility version 17.0.0, current version 17.0.0) /Applications/MonetDB.app/lib/libbat.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libstream.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libmutils.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.10) /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
otool -L /Applications/MonetDB.app/bin/mserver5 /Applications/MonetDB.app/bin/mserver5: /Applications/MonetDB.app/lib/libmonetdb5.5.dylib (compatibility version 17.0.0, current version 17.0.0) /Applications/MonetDB.app/lib/libbat.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libstream.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libmutils.1.dylib (compatibility version 31.0.0, current version 31.0.0) /Applications/MonetDB.app/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3) /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.4) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.10) /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
Looks equal. Anyway, I'll recompile the toolchain later today... I see that iconv, libxml2 and readline are present on the iPod aswell so I'll try to make use of it, saves space. Maybe even attempt to compile it on the device.
if you're concerned about gdk_scanselect (et al.), you can (first) try configuring with --enable-noexpand=all --- and of course --disable-optimize --enable-debug to make compilation "as cheap as possible" ... Stefan
Stefan
------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
On 03-05-2009 19:03:57 +0200, Stefan.Manegold@cwi.nl wrote:
Looks equal. Anyway, I'll recompile the toolchain later today... I see that iconv, libxml2 and readline are present on the iPod aswell so I'll try to make use of it, saves space. Maybe even attempt to compile it on the device.
if you're concerned about gdk_scanselect (et al.), you can (first) try configuring with --enable-noexpand=all --- and of course --disable-optimize --enable-debug to make compilation "as cheap as possible" ...
MonetDB doesn't compile gdk_scanselect on my FreeBSD Xen instance due its requirements, (>2.5GB of (virtual) memory), the only package I've encountered so far with such requirements.
iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mserver5 --dbinit="include sql;" # MonetDB server v5.11.0, based on kernel v1.29.0 # Serving database 'demo', using 1 thread # Compiled for arm-apple-darwin9/32bit with 32bit OIDs dynamically linked # Copyright (c) 1993-July 2008 CWI. # Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved # Visit http://monetdb.cwi.nl/ for further information #warning: please don't forget to set your vault key! #(see /Applications/MonetDB.app/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ # MonetDB/SQL module v2.29.0 loaded
iPod-van-Stefan-de-Konink:/Applications/MonetDB.app/bin root# ./mserver5 --dbinit="include sql;" # MonetDB server v5.11.0, based on kernel v1.29.0 # Serving database 'demo', using 1 thread # Compiled for arm-apple-darwin9/32bit with 32bit OIDs dynamically linked # Copyright (c) 1993-July 2008 CWI. # Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved # Visit http://monetdb.cwi.nl/ for further information #warning: please don't forget to set your vault key! #(see /Applications/MonetDB.app/etc/monetdb5.conf) # Listening for connection requests on mapi:monetdb://127.0.0.1:50000/ # MonetDB/SQL module v2.29.0 loaded
iPod-van-Stefan-de-Konink:~ root# /Applications/MonetDB.app/bin/mclient -lsql sql>select id, name, schema_id from tables where query is null; +------+--------------+-----------+ | id | name | schema_id | +======+==============+===========+ | 1062 | schemas | 1061 | | 1067 | types | 1061 | | 1076 | functions | 1061 | | 1085 | args | 1061 | | 1093 | sequences | 1061 | | 1103 | dependencies | 1061 | | 1107 | connections | 1061 | | 1116 | _tables | 1061 | | 1124 | _columns | 1061 | | 1134 | keys | 1061 | | 1141 | idxs | 1061 | | 1146 | triggers | 1061 | | 1157 | keycolumns | 1061 | | 1163 | _tables | 1162 | | 1171 | _columns | 1162 | | 1181 | keys | 1162 | | 1188 | idxs | 1162 | | 1193 | triggers | 1162 | | 1204 | keycolumns | 1162 | | 4129 | db_user_info | 1061 | | 4141 | user_role | 1061 | | 4144 | auths | 1061 | | 4148 | privileges | 1061 | +------+--------------+-----------+ 23 tuples After selling my soul to a new cross compiled toolchain, and downgrading iconv to 0.11.1. Everything worked out of the box; except for the minor detail 'application signing'. For some reason the default permissions do not like mserver5 at all, the binary is Killed as if it was not signed at all. I have yet to find out why. The multi-billion rouble company I work for in the off hours just released the binaries on: http://idatabase.kinkrsoftware.nl/ Stefan (lets see how fast google indices this)
Stefan de Konink wrote:
Everything worked out of the box; except for the minor detail 'application signing'. For some reason the default permissions do not like mserver5 at all, the binary is Killed as if it was not signed at all. I have yet to find out why.
Help from the pro's; dynamic library signing was also required :) So it runs on any jailbroken 2.x device now :) Stefan
On Mon, May 04, 2009 at 05:41:38AM +0200, Stefan de Konink wrote:
Stefan de Konink wrote:
Everything worked out of the box; except for the minor detail 'application signing'. For some reason the default permissions do not like mserver5 at all, the binary is Killed as if it was not signed at all. I have yet to find out why.
Help from the pro's; dynamic library signing was also required :) So it runs on any jailbroken 2.x device now :)
Great! ;-) Could you please send me the respective info/data to add a line to http://monetdb.cwi.nl/Development/TestWeb/Platforms/ ? Thanks! Stefan
Stefan
------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf _______________________________________________ Monetdb-developers mailing list Monetdb-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-developers
-- | Dr. Stefan Manegold | mailto:Stefan.Manegold@cwi.nl | | CWI, P.O.Box 94079 | http://www.cwi.nl/~manegold/ | | 1090 GB Amsterdam | Tel.: +31 (20) 592-4212 | | The Netherlands | Fax : +31 (20) 592-4312 |
participants (4)
-
Fabian Groffen
-
Stefan de Konink
-
Stefan Manegold
-
Stefan.Manegold@cwi.nl