sjjf / advanced-shell-history-old

Save your command line history in an sqlite3 DB. The original author has resurrected the project on github at https://github.com/barabo/advanced-shell-history.
Apache License 2.0
2 stars 3 forks source link

Problems compiling sqlite3 - possibly related to -lrt #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As noted in a user comment on the wiki:
BTW, I got a bunch of errors in "database.cc", here's the log of things I did

dhcp-172-27-196-220:Downloads yaroslavvb$ svn checkout 
http://advanced-shell-history.googlecode.com/svn/branches/rb-0.1/ /tmp/ash-src 
A /tmp/ash-src/LICENSE A /tmp/ash-src/files A /tmp/ash-src/files/usr A 
/tmp/ash-src/files/usr/share A /tmp/ash-src/files/usr/share/man A 
/tmp/ash-src/files/usr/share/man/man1 A 
/tmp/ash-src/files/usr/share/man/man1/advanced_shell_history.1.gz A 
/tmp/ash-src/files/usr/lib A /tmp/ash-src/files/usr/lib/advanced_shell_history 
A /tmp/ash-src/files/usr/lib/advanced_shell_history/zsh A 
/tmp/ash-src/files/usr/lib/advanced_shell_history/common A 
/tmp/ash-src/files/usr/lib/advanced_shell_history/bash A 
/tmp/ash-src/files/usr/local A /tmp/ash-src/files/usr/local/bin A 
/tmp/ash-src/files/etc A /tmp/ash-src/files/etc/ash A 
/tmp/ash-src/files/etc/ash/ash.conf A /tmp/ash-src/files/etc/ash/queries A 
/tmp/ash-src/TODO A /tmp/ash-src/src A /tmp/ash-src/src/ash_query.cpp A 
/tmp/ash-src/src/flags.hpp A /tmp/ash-src/src/fetch_sqlite.sh A 
/tmp/ash-src/src/formatter.cpp A /tmp/ash-src/src/database.cpp A 
/tmp/ash-src/src/ash_query.hpp A /tmp/ash-src/src/config.cpp A 
/tmp/ash-src/src/formatter.hpp A /tmp/ash-src/src/database.hpp A 
/tmp/ash-src/src/config.hpp A /tmp/ash-src/src/ash_log.cpp A 
/tmp/ash-src/src/README A /tmp/ash-src/src/util.cpp A 
/tmp/ash-src/src/queries.cpp A /tmp/ash-src/src/command.cpp A 
/tmp/ash-src/src/logger.cpp A /tmp/ash-src/src/ash_log.hpp A 
/tmp/ash-src/src/queries.hpp A /tmp/ash-src/src/util.hpp A 
/tmp/ash-src/src/unix.cpp A /tmp/ash-src/src/command.hpp A 
/tmp/ash-src/src/session.cpp A /tmp/ash-src/src/logger.hpp A 
/tmp/ash-src/src/TODO A /tmp/ash-src/src/queries.l A 
/tmp/ash-src/src/session.hpp A /tmp/ash-src/src/unix.hpp A 
/tmp/ash-src/src/flags.cpp A /tmp/ash-src/src/Makefile A /tmp/ash-src/man A 
/tmp/ash-src/man/ash_query.1 A /tmp/ash-src/man/ash_log.1 A /tmp/ash-src/README 
A /tmp/ash-src/Makefile Checked out revision 110. dhcp-172-27-196-220:Downloads 
yaroslavvb$ cd /tmp/ash-src dhcp-172-27-196-220:ash-src yaroslavvb$ ls LICENSE   
Makefile    README   TODO    files   man     src dhcp-172-27-196-220:ash-src yaroslavvb$ 
make sed -i -e "/^VERSION :=/s/:= ./:= 0.1.r110/" src/Makefile

Compiling source code... ./fetch_sqlite.sh Inspecting 
http://sqlite.org/download.html to guess latest version... Archive: 
sqlite-amalgamation-3071000.zip

creating: sqlite-amalgamation-3071000/
inflating: sqlite-amalgamation-3071000/sqlite3.h inflating: 
sqlite-amalgamation-3071000/shell.c inflating: 
sqlite-amalgamation-3071000/sqlite3ext.h inflating: 
sqlite-amalgamation-3071000/sqlite3.c
gcc -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_THREADSAFE=0 -c sqlite3.c g++ -c -g 
-Wall -DASH_VERSION="\"0.1.r110\"" -ansi -pedantic -O2 -lrt -o ash_log.o 
ash_log.cpp i686-apple-darwin10-g++-4.2.1: -lrt: linker input file unused 
because linking not done g++ -c -g -Wall -DASH_VERSION="\"0.1.r110\"" -ansi 
-pedantic -O2 -lrt -o command.o command.cpp i686-apple-darwin10-g++-4.2.1: 
-lrt: linker input file unused because linking not done g++ -c -g -Wall 
-DASH_VERSION="\"0.1.r110\"" -ansi -pedantic -O2 -lrt -o config.o config.cpp 
i686-apple-darwin10-g++-4.2.1: -lrt: linker input file unused because linking 
not done g++ -c -g -Wall -DASH_VERSION="\"0.1.r110\"" -ansi -pedantic -O2 -lrt 
-o database.o database.cpp database.cpp: In function ‘void ash_sleep()’: 
database.cpp:200: error: ‘CLOCK_MONOTONIC’ was not declared in this scope 
database.cpp:200: error: ‘clock_gettime’ was not declared in this scope 
database.cpp:220: error: ‘CLOCK_MONOTONIC’ was not declared in this scope 
database.cpp:220: error: ‘clock_nanosleep’ was not declared in this scope 
database.cpp:256: error: ‘CLOCK_MONOTONIC’ was not declared in this scope 
database.cpp:256: error: ‘clock_gettime’ was not declared in this scope 
make1?: [database.o] Error 1 make: build? Error 2 dhcp-172-27-196-220:ash-src 
yaroslavvb$

Original issue reported on code.google.com by c...@google.com on 20 Jul 2012 at 2:55