Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document support for external archive amalgamation #753

Closed
gotson opened this issue Jul 29, 2022 · 5 comments
Closed

Document support for external archive amalgamation #753

gotson opened this issue Jul 29, 2022 · 5 comments
Assignees

Comments

@gotson
Copy link
Collaborator

gotson commented Jul 29, 2022

#464 #466

@michael-o i think we should document this somewhere. The current state of the README and README_BUILD is probably not the best, but seems like a feature for which we should have documentation.

I'm open to suggestions about the documentation.

@michael-o
Copy link
Contributor

I can basically share what I do on HP-UX and FreeBSD. This works quite well and should work on any POSIX-like OS.

@gotson
Copy link
Collaborator Author

gotson commented Jul 30, 2022

I can basically share what I do on HP-UX and FreeBSD. This works quite well and should work on any POSIX-like OS.

I think that would help, you can maybe share here in this issue, and we can figure out where to put that at a later stage.

@michael-o
Copy link
Contributor

michael-o commented Aug 1, 2022

This is my example for HP-UX, since I build there everything from source:
Building SQLite:

CPPFLAGS="$CPPFLAGS -DSQLITE_HAVE_ISNAN -DSQLITE_ENABLE_COLUMN_METADATA" \
  LDFLAGS="$LDFLAGS -Wl,+concatrpath -Wl,+b -Wl,$LIBDIR -L$LIBDIR" \
  $CONFIGURE --enable-readline
make install

Note: I don't compile SQLite as part of the JDBC driver because other OSS uses SQLite as well.
Now compiling and linking to the JNI code:

gmake native SQLITE_OBJ=$LIBDIR/libsqlite3.a SQLITE_HEADER=$PREFIX/include/sqlite3.h
cp target/classes/org/sqlite/native/HPUX/ia64_32/libsqlitejdbc.so $LIBDIR

Note: I was not able to link dynamically on HP-UX, I don't know why, but static linking is good enough for me.

On FreeBSD it is a bit simpler, dynamic linking just works with SQLite from Ports:

gmake native SQLITE_OBJ=/usr/local/lib/libsqlite3.so SQLITE_HEADER=/usr/local/include/sqlite3.h JAVAC=javac JAVA=java CC=cc
$ ldd src/main/resources/org/sqlite/native/FreeBSD/x86_64/libsqlitejdbc.so
src/main/resources/org/sqlite/native/FreeBSD/x86_64/libsqlitejdbc.so:
        libsqlite3.so.0 => /usr/local/lib/libsqlite3.so.0 (0x800e00000)
        libc.so.7 => /lib/libc.so.7 (0x80024e000)
        libz.so.6 => /lib/libz.so.6 (0x800684000)
        libm.so.5 => /lib/libm.so.5 (0x8006a1000)
        libthr.so.3 => /lib/libthr.so.3 (0x8006d8000)

I would always prefer an external linked version of SQLite instead of the current amalagation because mostly people don't like to upgrade twice.

@michael-o
Copy link
Contributor

@gotson Let me know whether this is acceptable for you.

@gotson
Copy link
Collaborator Author

gotson commented Aug 9, 2022

@gotson Let me know whether this is acceptable for you.

I think it's a good start, i need to find some time to integrate this in the documentation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants