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

Compilation error in FreeBSD #65

Open
lpvm opened this issue Sep 30, 2021 · 1 comment
Open

Compilation error in FreeBSD #65

lpvm opened this issue Sep 30, 2021 · 1 comment

Comments

@lpvm
Copy link

lpvm commented Sep 30, 2021

On a FreeBSD 13.0-RELEASE-p3 system, I'd like to use sqlite3.

$ tar -zxvf v0.7.2.tar.gz
$ cd luadbi-0.7.2/
$ LUA_V=52 LUA_INC=/usr/local/include/lua52 SQLITE_INC=/usr/local/include/ make sqlite3 
cc -c -o build/dbd_common.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -DPIC -std=c99 -O2 -pipe -I.
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-std=c99' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
cc -c -o build/dbd_sqlite3_main.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: -lsqlite3: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-std=c99' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I /usr/include' [-Wunused-command-line-argument]
cc -c -o build/dbd_sqlite3_connection.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: -lsqlite3: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc -c -o build/dbd_sqlite3_connection.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -sha
red -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: -lsqlite3: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
cc -c -o build/dbd_common.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -D
PIC -std=c99 -O2 -pipe -I.
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-std=c99' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]

cc -c -o build/dbd_sqlite3_connection.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -sha
red -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: -lsqlite3: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-std=c99' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I /usr/include' [-Wunused-command-line-argument]

cc -c -o build/dbd_sqlite3_statement.o  /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: warning: /usr/local/include/lua52: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: -lsqlite3: 'linker' input unused [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-g' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-pedantic' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-Wall' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-fPIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-D PIC' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-std=c99' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-O2' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I .' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
cc: warning: argument unused during compilation: '-I /usr/include' [-Wunused-command-line-argument]
cc build/dbd_common.o build/dbd_sqlite3_main.o build/dbd_sqlite3_connection.o build/dbd_sqlite3_statement.o -o dbd/sqlite3.so /usr/local/include/lua52 -g -pedantic -Wall -O2 -shared -fPIC -DPIC -std=c99 -O2 -pipe -I. -shared  -I/usr/include -lsqlite3
cc: error: no such file or directory: 'build/dbd_common.o'
cc: error: no such file or directory: 'build/dbd_sqlite3_main.o'
cc: error: no such file or directory: 'build/dbd_sqlite3_connection.o'
cc: error: no such file or directory: 'build/dbd_sqlite3_statement.o'
*** Error code 1

Stop.
make: stopped in /usr/home/jabber2/luadbi-0.7.2
@sparked435
Copy link
Collaborator

Two issues here:

  • BSD make doesn't seem to work, hasn't ever as far as I know. Use gmake. You can get that with 'pkg install gmake'
  • The variable to override is 'SQLITE3_INC', not 'SQLITE_INC'. You'll also need to override SQLITE3_LDFLAGS.

Completed command:

LUA_V=52 LUA_INC=-I/usr/local/include/lua52 SQLITE3_INC=-I/usr/local/include/ SQLITE3_LDFLAGS='-L/usr/local/lib -lsqlite3' gmake sqlite3

This got me a usable dbd/sqlite3.so on FreeBSD 13.2/amd64.

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

No branches or pull requests

2 participants