Bug 8234 - smbtatools compilation error on Solaris 10
smbtatools compilation error on Solaris 10
Status: NEEDINFO
Product: smbta
Classification: Unclassified
Component: general
unspecified
All All
: P5 normal
: ---
Assigned To: Holger Hetterich
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-14 13:03 UTC by bjl
Modified: 2011-09-06 15:46 UTC (History)
2 users (show)

See Also:


Attachments
SunOS (Solaris) Detection and addition of libraries (934 bytes, patch)
2011-07-20 21:04 UTC, Holger Hetterich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description bjl 2011-06-14 13:03:52 UTC
1.2.5 smbtad compiled OK (although "local" was appended to my DESTDIR).

Compiling 1.2.5 smbtatools with gcc 4.3.3 produced the following error:

62 bjl@bsuc>make DESTDIR=/sysadmin/packages/smbta/1.2.5 install
Scanning dependencies of target buildiniparser
[  0%] Building iniparser.
compiling src/iniparser.c ...
compiling src/dictionary.c ...
a - src/iniparser.o
a - src/dictionary.o
[  3%] Built target buildiniparser
Scanning dependencies of target rrddriver
[  7%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/main.c.o
In file included from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/../../../../include/common.h:41,
                 from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/includes.h:25,
                 from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/main.c:21:
/sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/../../../../include/../src/common/config-struct.h:4:29: error: sqlite3.h: No such file or directory
In file included from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/../../../../include/common.h:41,
                 from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/includes.h:25,
                 from /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/main.c:21:
/sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b/src/webmon/rrddriver/include/../../../../include/../src/common/config-struct.h:66: error: expected specifier-qualifier-list before âsqlite3â
make[2]: *** [CMakeFiles/rrddriver.dir/src/webmon/rrddriver/main.c.o] Error 1
make[1]: *** [CMakeFiles/rrddriver.dir/all] Error 2
make: *** [all] Error 2
63 bjl@bsuc>
Comment 1 Holger Hetterich 2011-06-15 20:24:37 UTC
How do you compile smbtatools? smbtatools does not require sqlite, as it builds its own version when required. How do you run cmake ?
Comment 2 bjl 2011-06-16 08:39:45 UTC
I just run "cmake ." in the source directory.

But before compiling smbtatools I compiled smbtad and to do that I set the following environment variables:

setenv CMAKE_INCLUDE_PATH /sysadmin/packages/samba/3.6.0pre3/include:/sysadmin/packages/smbta/sqlite/3.7.3/include:/sysadmin/packages/smbta/libdbi/0.8.4/include/dbi
setenv CMAKE_LIBRARY_PATH /sysadmin/packages/samba/3.6.0pre3/lib:/sysadmin/packages/smbta/sqlite/3.7.3/lib:/sysadmin/packages/smbta/libdbi/0.8.4/lib

I assumed cmake would ignore things it found in it's path that it didn't need.
Comment 3 bjl 2011-06-16 15:38:31 UTC
This is the cmake output:

4 bjl@bsuc>tar zxf hhetter-smbtatools-1.2.5-0-g16bc73b.zip 
59 bjl@bsuc>cd hhetter-smbtatools-16bc73b/
60 bjl@bsuc>../../cmake/2.8.3/bin/cmake .
-- The C compiler identification is GNU
-- Check for working C compiler: /nerc/packages/gcc/4.3.3/bin/gcc
-- Check for working C compiler: /nerc/packages/gcc/4.3.3/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found Sqlite: /sysadmin/packages/smbta/sqlite/3.7.3/include 
sh: gnome-config: not found
-- Found LibDbi: /sysadmin/packages/smbta/libdbi/0.8.4/lib/libdbi.so 
sh: gnome-config: not found
-- ----> FYI: Nice, your system provides sqlite >= 3.7.0, we
--            will make the build linking shared to this library.
-- Found Libsmbclient: /sysadmin/packages/samba/3.6.0pre3/lib/libsmbclient.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so;/sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- ----> FYI: Unable to find iniparser libraries on your system
-- ---->      compiling my own version and link it statically.
-- Found Curses: /usr/lib/64/libcurses.so 
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Found Threads: TRUE 
-- Configuring done
-- Generating done
-- Build files have been written to: /sysadmin/packages/smbta/src/hhetter-smbtatools-16bc73b
61 bjl@bsuc>
Comment 4 Holger Hetterich 2011-06-20 16:56:51 UTC
Ok, since a few versions of smbtatools, we have the following behaviour:

- if sqlite is not available at all, build with the included version. Bruce, I would love if you could try this. Just remove

setenv CMAKE_INCLUDE_PATH
/sysadmin/packages/samba/3.6.0pre3/include:/sysadmin/packages/smbta/sqlite/3.7.3/include:/sysadmin/packages/smbta/libdbi/0.8.4/include/dbi
setenv CMAKE_LIBRARY_PATH
/sysadmin/packages/samba/3.6.0pre3/lib:/sysadmin/packages/smbta/sqlite/3.7.3/lib:/sysadmin/packages/smbta/libdbi/0.8.4/lib

the /sysadmin/packages/smbta/sqlite/3.7.3/include and /sysadmin/packages/smbta/sqlite/3.7.3/lib from your CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH. This will make smbtatools think sqlite is not available and it will build it's own version.


- if sqlite is available, smbtatools is going to try this version. Obviously in this case there is a bug when smbtatools is trying to build against a library that is not installed in the system paths. This is an error situation indeed and has to be fixed.
Comment 5 bjl 2011-06-21 09:24:11 UTC
Hi Holger. I removed sqlite from the cmake paths and reran the build process on the latest smbtatools which I just downloaded. I think it's 1 monor version up from my last build. Still got a compilation error I'm affraid. Here's the outputs:

setenv CMAKE_INCLUDE_PATH /sysadmin/packages/samba/3.6.0pre3/include:/sysadmin/packages/smbta/libdbi/0.8.4/include/dbi
setenv CMAKE_LIBRARY_PATH /sysadmin/packages/samba/3.6.0pre3/lib:/sysadmin/packages/smbta/libdbi/0.8.4/lib

78 bjl@bsuc>cd hhetter-smbtatools-624f329/
79 bjl@bsuc>../../cmake/2.8.3/bin/cmake .
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
sh: gnome-config: not found
-- Found LibDbi: /sysadmin/packages/smbta/libdbi/0.8.4/lib/libdbi.so 
sh: gnome-config: not found
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
-- ----> FYI: Seems like there're no sqlite3 development files
--            installed.
--            That's ok, we will build the 
--            sqlite amalgamation code then.
-- Found Libsmbclient: /sysadmin/packages/samba/3.6.0pre3/lib/libsmbclient.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so;/sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- ----> FYI: Unable to find iniparser libraries on your system
-- ---->      compiling my own version and link it statically.
-- Found Curses: /usr/lib/64/libcurses.so 
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Found Threads: TRUE 
-- Configuring done
-- Generating done
-- Build files have been written to: /sysadmin/packages/smbta/src/hhetter-smbtatools-624f329


80 bjl@bsuc>make DESTDIR=/sysadmin/packages/smbta/1.2.5 install
Scanning dependencies of target buildiniparser
[  0%] Building iniparser.
compiling src/iniparser.c ...
compiling src/dictionary.c ...
a - src/iniparser.o
a - src/dictionary.o
[  3%] Built target buildiniparser
Scanning dependencies of target rrddriver
[  7%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/main.c.o
[ 10%] Building C object CMakeFiles/rrddriver.dir/src/common/common.c.o
[ 14%] Building C object CMakeFiles/rrddriver.dir/src/common/aes.c.o
[ 17%] Building C object CMakeFiles/rrddriver.dir/src/common/rijndael-alg-fst.c.o
[ 21%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/configuration.c.o
[ 25%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/network.c.o
[ 28%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/monitor-list.c.o
Linking C executable rrddriver
[ 28%] Built target rrddriver
Scanning dependencies of target smbtamonitor
[ 32%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/main.c.o
[ 35%] Building C object CMakeFiles/smbtamonitor.dir/src/common/common.c.o
[ 39%] Building C object CMakeFiles/smbtamonitor.dir/src/common/aes.c.o
[ 42%] Building C object CMakeFiles/smbtamonitor.dir/src/common/rijndael-alg-fst.c.o
[ 46%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/configuration.c.o
[ 50%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/network.c.o
[ 53%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/monitor-list.c.o
[ 57%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/visual.c.o
[ 60%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/backlog.c.o
Linking C executable smbtamonitor
[ 60%] Built target smbtamonitor
Scanning dependencies of target smbtaquery
[ 64%] Building C object CMakeFiles/smbtaquery.dir/src/query/sqlite/sqlite3.c.o
[ 67%] Building C object CMakeFiles/smbtaquery.dir/src/query/main.c.o
[ 71%] Building C object CMakeFiles/smbtaquery.dir/src/common/common.c.o
[ 75%] Building C object CMakeFiles/smbtaquery.dir/src/common/aes.c.o
[ 78%] Building C object CMakeFiles/smbtaquery.dir/src/common/rijndael-alg-fst.c.o
[ 82%] Building C object CMakeFiles/smbtaquery.dir/src/query/configuration.c.o
[ 85%] Building C object CMakeFiles/smbtaquery.dir/src/query/interpreter.c.o
[ 89%] Building C object CMakeFiles/smbtaquery.dir/src/query/network.c.o
[ 92%] Building C object CMakeFiles/smbtaquery.dir/src/query/convert.c.o
Linking C executable smbtaquery
[ 92%] Built target smbtaquery
Scanning dependencies of target smbtatorture
[ 96%] Building C object CMakeFiles/smbtatorture.dir/src/torture/smbtatorture.c.o
Linking C executable smbtatorture
[ 96%] Built target smbtatorture
Scanning dependencies of target smbtatorturesrv
[100%] Building C object CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c: In function ânetwork_create_socketâ:
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:375: warning: implicit declaration of function âbzeroâ
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:375: warning: incompatible implicit declaration of built-in function âbzeroâ
Linking C executable smbtatorturesrv
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `send_data':
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:272: undefined reference to `send'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `handle_data':
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:282: undefined reference to `recv'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:294: undefined reference to `recv'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `handle_network':
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:341: undefined reference to `accept'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `network_create_socket':
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:363: undefined reference to `socket'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:369: undefined reference to `setsockopt'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:378: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:378: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:378: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:380: undefined reference to `bind'
/sysadmin/packages/smbta/src/hhetter-smbtatools-624f329/src/torture/srv/smbtatorturesrv.c:387: undefined reference to `listen'
collect2: ld returned 1 exit status
make[2]: *** [smbtatorturesrv] Error 1
make[1]: *** [CMakeFiles/smbtatorturesrv.dir/all] Error 2
make: *** [all] Error 2
Comment 6 bjl 2011-06-21 09:28:42 UTC
Holger.

When I went to rebuild smbtatools this morning in my source directory I found I had the kit as a .zip file. I'm wondering if I accidentally downloaded the Windows version last time. Anyway today I definitely used the Linux version: hhetter-smbtatools-1.2.5-1-g624f329.tar.gz
Comment 7 Holger Hetterich 2011-07-05 19:38:23 UTC
Ok it looks like we are missing some headers Solaris is missing when compiling smbtatorturesrv, I'll look at that as soon as possible.
Comment 8 Holger Hetterich 2011-07-07 21:53:18 UTC
I was shortly looking at this but found no difference as of the header files, will take a deeper look tomorrow.
Comment 9 Holger Hetterich 2011-07-12 16:54:08 UTC
[devel 76e4346] changes all the includes to be exact the same as in smbtatorture, which may help to build on solaris, as smbtatorture builds just fine.

This is just picking in the dark, but it may fix it. I would need access to the platform to easily fix this. However, Bruce, please try. Take care you fetch the devel-version of smbtatools.
Comment 10 bjl 2011-07-20 13:25:50 UTC
Holger. Sorry for lack of response, been rather swamped. Will try the developer build now...
Comment 11 bjl 2011-07-20 14:17:42 UTC
Holger. I had some trouble on Github finding the s/w. So I may have downloaded the wrong version. But I did go to the devel branch. Still had the same problem I'm afraid:

70 bjl@bsuc>cd hhetter-smbtatools-fca1fe7/

71 bjl@bsuc>../../cmake/2.8.3/bin/cmake .
-- The C compiler identification is GNU
-- Check for working C compiler: /nerc/packages/gcc/4.3.3/bin/gcc
-- Check for working C compiler: /nerc/packages/gcc/4.3.3/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
sh: gnome-config: not found
-- Found LibDbi: /sysadmin/packages/smbta/libdbi/0.8.4/lib/libdbi.so 
sh: gnome-config: not found
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
-- Could NOT find Sqlite (missing:  SQLITE_INCLUDE_DIR SQLITE_LIBRARIES SQLITE_VERSION_OK) 
-- ----> FYI: Seems like there're no sqlite3 development files
--            installed.
--            That's ok, we will build the 
--            sqlite amalgamation code then.
-- Found Libsmbclient: /sysadmin/packages/samba/3.6.0pre3/lib/libsmbclient.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- Found Talloc: /sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so;/sysadmin/packages/samba/3.6.0pre3/lib/libtalloc.so
-- ----> FYI: Unable to find iniparser libraries on your system
-- ---->      compiling my own version and link it statically.
-- Found Curses: /usr/lib/64/libcurses.so 
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for thr_create in thread
-- Looking for thr_create in thread - found
-- Found Threads: TRUE 
-- Configuring done
-- Generating done
-- Build files have been written to: /sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7


72 bjl@bsuc>make DESTDIR=/sysadmin/packages/smbta/1.2.5 install
Scanning dependencies of target buildiniparser
[  0%] Building iniparser.
compiling src/iniparser.c ...
compiling src/dictionary.c ...
a - src/iniparser.o
a - src/dictionary.o
[  3%] Built target buildiniparser
Scanning dependencies of target rrddriver
[  7%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/main.c.o
[ 10%] Building C object CMakeFiles/rrddriver.dir/src/common/common.c.o
[ 14%] Building C object CMakeFiles/rrddriver.dir/src/common/aes.c.o
[ 17%] Building C object CMakeFiles/rrddriver.dir/src/common/rijndael-alg-fst.c.o
[ 21%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/configuration.c.o
[ 25%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/network.c.o
[ 28%] Building C object CMakeFiles/rrddriver.dir/src/webmon/rrddriver/monitor-list.c.o
Linking C executable rrddriver
[ 28%] Built target rrddriver
Scanning dependencies of target smbtamonitor
[ 32%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/main.c.o
[ 35%] Building C object CMakeFiles/smbtamonitor.dir/src/common/common.c.o
[ 39%] Building C object CMakeFiles/smbtamonitor.dir/src/common/aes.c.o
[ 42%] Building C object CMakeFiles/smbtamonitor.dir/src/common/rijndael-alg-fst.c.o
[ 46%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/configuration.c.o
[ 50%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/network.c.o
[ 53%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/monitor-list.c.o
[ 57%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/visual.c.o
[ 60%] Building C object CMakeFiles/smbtamonitor.dir/src/monitor/backlog.c.o
Linking C executable smbtamonitor
[ 60%] Built target smbtamonitor
Scanning dependencies of target smbtaquery
[ 64%] Building C object CMakeFiles/smbtaquery.dir/src/query/sqlite/sqlite3.c.o
[ 67%] Building C object CMakeFiles/smbtaquery.dir/src/query/main.c.o
[ 71%] Building C object CMakeFiles/smbtaquery.dir/src/common/common.c.o
[ 75%] Building C object CMakeFiles/smbtaquery.dir/src/common/aes.c.o
[ 78%] Building C object CMakeFiles/smbtaquery.dir/src/common/rijndael-alg-fst.c.o
[ 82%] Building C object CMakeFiles/smbtaquery.dir/src/query/configuration.c.o
[ 85%] Building C object CMakeFiles/smbtaquery.dir/src/query/interpreter.c.o
[ 89%] Building C object CMakeFiles/smbtaquery.dir/src/query/network.c.o
[ 92%] Building C object CMakeFiles/smbtaquery.dir/src/query/convert.c.o
Linking C executable smbtaquery
[ 92%] Built target smbtaquery
Scanning dependencies of target smbtatorture
[ 96%] Building C object CMakeFiles/smbtatorture.dir/src/torture/smbtatorture.c.o
Linking C executable smbtatorture
[ 96%] Built target smbtatorture
Scanning dependencies of target smbtatorturesrv
[100%] Building C object CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c: In function ânetwork_create_socketâ:
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:350: warning: implicit declaration of function âbzeroâ
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:350: warning: incompatible implicit declaration of built-in function âbzeroâ
Linking C executable smbtatorturesrv
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `send_data':
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:247: undefined reference to `send'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `handle_data':
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:257: undefined reference to `recv'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:269: undefined reference to `recv'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `handle_network':
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:316: undefined reference to `accept'
CMakeFiles/smbtatorturesrv.dir/src/torture/srv/smbtatorturesrv.c.o: In function `network_create_socket':
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:338: undefined reference to `socket'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:344: undefined reference to `setsockopt'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:353: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:353: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:353: undefined reference to `in6addr_any'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:355: undefined reference to `bind'
/sysadmin/packages/smbta/src/hhetter-smbtatools-fca1fe7/src/torture/srv/smbtatorturesrv.c:362: undefined reference to `listen'
collect2: ld returned 1 exit status
make[2]: *** [smbtatorturesrv] Error 1
make[1]: *** [CMakeFiles/smbtatorturesrv.dir/all] Error 2
make: *** [all] Error 2
Comment 12 bjl 2011-07-20 14:38:03 UTC
Holger. I've shown the problem to somebody here who is testing a theory:

"From your error messages looks just like it needs -lnsl adding to the 
libraries, but will have a look and see if I can add it."

He says those options aren't needed for Linux but are for Solaris.

I'll get back to you...Bruce
Comment 13 bjl 2011-07-20 15:18:23 UTC
The solution:

It builds by modifying the smbtatorturesrv rules in CMakeLists.txt to add 
the socket & nsl libraries - change line 146 to

TARGET_LINK_LIBRARIES(${CurrentExe} socket nsl)



This is with the master version for 1.2.5
...not my work. Bruce
Comment 14 Holger Hetterich 2011-07-20 15:53:36 UTC
Argh, yes, thank you Bruce (and thanks to your colleague!). Initially it was my fault I looked too fast and confused the linker error with a build error. I'll try if this addition is still compatible with linux and apply the changes as soon as possible. 

Thanks!
Comment 15 Holger Hetterich 2011-07-20 21:04:26 UTC
Created attachment 6708 [details]
SunOS (Solaris) Detection and addition of libraries
Comment 16 Holger Hetterich 2011-07-20 21:05:44 UTC
attached patch should fix this for the smbtatorturesrv compile.
Comment 17 Holger Hetterich 2011-07-20 21:07:50 UTC
pushed for the devel branch
Comment 18 Holger Hetterich 2011-09-06 15:46:45 UTC
Bruce, any news here?