Re: FreeTDS build on AIX - No shared objects (.so) generated?
"Worman, Tyler" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <E2A6D66037717A489D9187BFB0719D4C4D49910D@UHEXMBSPR11.umhs.med.umich.edu> |
Got it working....Out of curiosity after seeing the bsqldb error and playing with libtool, I poked around the file structure of the 32-bit build.
In /home/tworman/freetds-0.95.19/src/odbc/.libs I found libtdsodbc.so.0
I copied this to /home/tworman/local/libs (where I installed to) as my .so file and now osql and isql work perfect.
Thank you so much. Still unsure why that wasn't copied/linked on the make install like it did on linux. This proves to me though that my build of the .so from the .a file didn't work as planned.
Next is to try the 64 bit build.
- Tyler
-----Original Message-----
From: Worman, Tyler
Sent: Thursday, September 17, 2015 12:10 AM
To: '[email protected]'; [email protected]
Subject: RE: [freetds] FreeTDS build on AIX - No shared objects (.so) generated?
I was curious about the .a too, so I tried to direct UnixODBC to use the .a as the driver file but no luck. Unfortunately I'm not terribly familiar with AIX and our admin has been swamped, so my time with him is limited for questioned about the shared objects.
[01000][unixODBC][Driver Manager]Can't open lib '/home/tworman/local/lib/libtdsodbc.a' : file not found
[ISQL]ERROR: Could not SQLConnect
But the file is there....
bash-4.2$ file /home/tworman/local/lib/libtdsodbc.a
/home/tworman/local/lib/libtdsodbc.a: archive (big format)
This is from the .so I generated with gcc.
bash-4.2$ file libtdsodbc.so
libtdsodbc.so: executable (RISC System/6000) or object module not stripped
bash-4.2$ bsqldb
Could not load program bsqldb:
Dependent module ../dblib/.libs/libsybdb.a(libsybdb.so.5) could not be loaded.
Could not load module ../dblib/.libs/libsybdb.a(libsybdb.so.5).
System error: No such file or directory
I don't understand why it's looking where it is for the file. That is in the bin directory under my local install path. No dblib folder exists below that. The libsysdb.a file is located in ../lib/
Tried bsqlodbc but it gives the same issue as osql/isql does.
bsqlodbc gives the same:
bsqlodbc: error -1: SQLConnect: SQL_ERROR: failed "[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed"
Thank you for the response. I really appreciate the help! Going to try Frediano's advice and see if I can't get a full set of 64 bit builds working. Maybe I'll have slight better luck vs the 32 bit libraries. Results from 32bit DBLib unit tests and the configure are below.
- Tyler
Dblib unit tests.
env CFLAGS="-I/usr/local/include" AR_FLAGS="cru" ARFLAGS="cru" LD_LIBRARY_PATH=/usr/local/lib/ ./configure --with-unixodbc=/usr/local/ --prefix=/home/tworman/local --with-tdsver=7.0 make
Then the test results:
PASS: t0001
PASS: t0002
PASS: t0003
PASS: t0004
FAIL: t0005
PASS: t0006
PASS: t0007
PASS: t0008
PASS: t0009
PASS: t0011
PASS: t0012
FAIL: t0013
FAIL: t0014
PASS: t0015
PASS: t0016
PASS: t0017
PASS: t0018
PASS: t0019
PASS: t0020
PASS: t0021
FAIL: t0022
FAIL: t0023
FAIL: rpc
FAIL: dbmorecmds
FAIL: bcp
FAIL: thread
PASS: text_buffer
PASS: done_handling
PASS: timeout
FAIL: hang
PASS: null
PASS: null2
PASS: setnull
FAIL: numeric
PASS: pending
============================================================================
Testsuite summary for FreeTDS 0.95.19
============================================================================
# TOTAL: 35
# PASS: 24
# SKIP: 0
# XFAIL: 0
# FAIL: 11
# XPASS: 0
# ERROR: 0
============================================================================
See src/dblib/unittests/test-suite.log
============================================================================
make: The error code from the last command is 1 Stop.
make: The error code from the last command is 2.
Stop.
make: The error code from the last command is 2.
Stop.
Most of the failures in the test suite were a result of lack of permissions for the account I have to create tables/procedures in certain areas.
Output of the configure above:
checking for a BSD-compatible install... ./install-sh -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... ./install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... nawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking for gawk... (cached) nawk checking for grep that handles long lines and -e... /usr/bin/grep checking whether ln -s works... yes checking for ranlib... ranlib checking for a sed that does not truncate output... /usr/bin/sed checking build system type... powerpc-ibm-aix7.1.0.0 checking host system type... powerpc-ibm-aix7.1.0.0 checking for style of include used by make... GNU checking for
gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables...
checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h
presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for special C compiler options needed for large files... no checking for
_FILE_OFFSET_BITS value needed for large files... unknown checking for _LARGE_FILES value needed for large files... 1 checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking dependency style of gcc... (cached) gcc3 checking how to run the C preprocessor... gcc -E checking for inline... inline checking how to print strings... print -r checking for a sed that does not truncate output... (cached) /usr/bin/sed checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no checking for BSD- or
MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking the maximum length of command line arguments... 786432 checking wheth
er the shell understands some XSI constructs... yes checking whether the shell understands "+="... no checking how to convert powerpc-ibm-aix7.1.0.0 file names to powerpc-ibm-aix7.1.0.0 format... func_convert_file_noop checking how to convert powerpc-ibm-aix7.1.0.0 file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... dlltool checking how to associate runtime and link libraries... print -r -- checking for ar... ar checking for archiver @FILE support... no checking for strip... strip checking for ranlib... (cached) ranlib checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot...
no checking for mt... mt checking if mt is a manifest tool... no checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking fo
r gcc option to produce PIC... -DPIC checking if gcc PIC flag -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... aix7.1.0.0 ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... no checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no checking for library containing dlopen... none required checking for dlerror... yes checking for shl_load... no checking for shl_load in -ldld... no checking
for dld_link in -ldld... no checking for windres... no checking for ld used by GCC... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... no checking for shared library run path o
rigin... done checking for iconv... yes checking how to link with libiconv... /home/tworman/local/lib/libiconv.a
checking for iconv declaration...
extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for doxygen... no checking for odbc_config... odbc_config checking for pkg-config... no checking for library containing socket... none required checking for library containing gethostbyname... none required checking for library containing tgetent... -lcurses checking for readline in -lreadline... yes checking for rl_on_new_line... yes checking for rl_reset_line_state... yes checking for the pthreads library -lpthreads... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_THREAD_SAFE checking for library containing pthread_condattr_setclock... none required checking for pthread_condatt
r_setclock... yes checking for ANSI C header files... (cached) yes checking whether time.h and sys/time.h may both be included... yes checking whether struct tm is in sys/time.h or time.h...
time.h checking for struct tm.tm_zone... no checking whether tzname is declared... yes checking for tzname... yes checking for struct tm.__tm_zone... no checking errno.h usability... yes checking errno.h presence... yes checking for errno.h... yes checking libgen.h usability... yes checking libgen.h presence... yes checking for libgen.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking poll.h usability... yes checking poll.h presence... yes checking for poll.h... yes checking readpassphrase.h usability... no checking readpassphrase.h presence... no checking for readpassphrase.h... no checking signal.h usability... yes checking s
ignal.h presence... yes checking for signal.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking sys/param.h usability... yes c
hecking sys/param.h presence... yes checking for sys/param.h... yes checking sys/select.h usability... yes checking sys/select.h presence... yes checking for sys/select.h... yes checking for sys/stat.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for sys/types.h... (cached) yes checking sys/resource.h usability... yes checking sys/resource.h presence... yes checking for sys/resource.h... yes checking sys/wait.h usability... yes checking sys/wait.h presence... yes checking for sys/wait.h... yes checking for unistd.h... (cached) yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking wchar.h usability... yes checking wchar.h presence... yes checking for wch
ar.h... yes checking for inttypes.h... (cached) yes checking winsock2.h usability... no checking winsock2.h presence... no checking for winsock2.h... no checking localcharset.h usability...
yes checking localcharset.h presence... yes checking for localcharset.h... yes checking valgrind/memcheck.h usability... no checking valgrind/memcheck.h presence... no checking for valgrind/memcheck.h... no checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking dirent.h usability... yes checking dirent.h presence... yes checking for dirent.h... yes checking for windows.h... no checking for sql.h... yes checking for odbcss.h... yes checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking langinfo.h usability... yes checking langinfo.h presence... yes checking for langinfo.h... yes checking for netdb.h... (cached) yes checking netinet/in.h usability... yes checking netinet/in.h pre
sence... yes checking for netinet/in.h... yes checking netinet/tcp.h usability... yes checking netinet/tcp.h presence... yes checking for netinet/tcp.h... yes checking roken.h usability... n
o checking roken.h presence... no checking for roken.h... no checking com_err.h usability... no checking com_err.h presence... no checking for com_err.h... no checking paths.h usability... yes checking paths.h presence... yes checking for paths.h... yes checking sys/ioctl.h usability... yes checking sys/ioctl.h presence... yes checking for sys/ioctl.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking whether INADDR_NONE is defined... yes checking size of char... 1 checking size of short... 2 checking size of long... 4 checking size of int... 4 checking size of float... 4 checking size of double... 8 checking size of long double... 16 checking size of long long... 8 checking size of __int64... 0 checking size of vo
id *... 4 checking size of wchar_t... 2 checking is FIONBIO defined... yes checking for socklen_t... yes checking whether getopt has optreset support... no checking whether byte ordering is
bigendian... yes checking for an ANSI C-conforming const... yes checking whether we can use -static-libgcc... sed: Cannot find or open file conftest.c.
no
checking whether we can use -Wl,-static-libgcc... sed: Cannot find or open file conftest.c.
no
checking whether memset(0) sets pointers to NULL... yes checking for _atoi64... no checking for vsnprintf... yes checking for _vsnprintf... no checking for _vscprintf... no checking for gettimeofday... yes checking for nl_langinfo... yes checking for locale_charset... no checking for setenv... yes checking for putenv... yes checking for getuid... yes checking for getpwuid... yes checking for getpwuid_r... yes checking for fstat... yes checking for alarm... yes checking for fork... yes checking for gethrtime... no checking for localtime_r... yes checking for setitimer... yes checking for _lseeki64... no checking for _telli64... no checking for _fseeki64... no checking for _ftelli64... no checking for setrlimit... yes checking for pthread_cond_timedwait... yes checking for _lock_file... no c
hecking for _unlock_file... no checking for usleep... yes checking for nanosleep... yes checking for readdir_r... yes checking for inet_ntoa_r... yes checking for getipnodebyaddr... yes chec
king for getipnodebyname... yes checking for getaddrinfo... yes checking for inet_ntop... yes checking for gethostname... yes checking for poll... yes checking for socketpair... yes checking for asprintf... no checking for vasprintf... no checking for strtok_r... yes checking for readpassphrase... no checking for strlcpy... no checking for strlcat... no checking for basename... yes checking for getopt... yes checking for strsep... yes checking for _LARGEFILE_SOURCE value needed for large files... no checking for library containing clock_gettime... none required checking if clock_gettime support CLOCK_MONOTONIC... yes checking whether malloc_options variable is present... no checking compile-time options looking for installed odbc driver manager checking for SQLGetPrivateProfileString in -
lodbcinst... yes checking for SQLSETPOSIROW... yes checking for SQLROWSETSIZE... yes checking for SQLROWOFFSET... yes checking size of SQLWCHAR... 2 checking if openssl is wanted... no check
ing threadsafety... enabled checking for which type of gethostbyname_r... three checking for which type of getservbyname_r... four checking for which type of gethostbyaddr_r... five checking for which type of getpwuid_r... five checking for which type of localtime_r... struct
configure: debug enabled
checking CFLAGS for gcc -Wdeclaration-after-statement... -Wdeclaration-after-statement done checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating include/freetds/version.h
config.status: creating include/tds_sysdep_public.h
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/freetds/Makefile
config.status: creating doc/Makefile
config.status: creating samples/Makefile
config.status: creating src/Makefile
config.status: creating src/tds/Makefile
config.status: creating src/tds/unittests/Makefile
config.status: creating src/dblib/Makefile
config.status: creating src/dblib/unittests/Makefile
config.status: creating src/ctlib/Makefile
config.status: creating src/ctlib/unittests/Makefile
config.status: creating src/replacements/Makefile
config.status: creating src/replacements/unittests/Makefile
config.status: creating src/server/Makefile
config.status: creating src/pool/Makefile
config.status: creating src/odbc/Makefile
config.status: creating src/odbc/unittests/Makefile
config.status: creating src/apps/Makefile
config.status: creating src/apps/fisql/Makefile
config.status: creating freetds.spec
config.status: creating win32/Makefile
config.status: creating win32/config.h
config.status: creating win32/version.rc
config.status: creating win32/freetds.nsh
config.status: creating vms/Makefile
config.status: creating doc/freebcp.1
config.status: creating doc/tsql.1
config.status: creating doc/osql.1
config.status: creating doc/bsqldb.1
config.status: creating doc/bsqlodbc.1
config.status: creating doc/defncopy.1
config.status: creating doc/datacopy.1
config.status: creating doc/fisql.1
config.status: creating doc/freetds.conf.5
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
-----Original Message-----
From: FreeTDS [mailto:[email protected]] On Behalf Of James K. Lowden
Sent: Wednesday, September 16, 2015 6:32 PM
To: [email protected]
Subject: Re: [freetds] FreeTDS build on AIX - No shared objects (.so) generated?
On Tue, 15 Sep 2015 17:39:26 +0000
"Worman, Tyler" <[email protected]> wrote:
> Trying to build FreeTDS (stable .95.19) on AIX 7100-03-05-1524.
> The .so files don't generate. Browsed online and tried a few suggested
> fixes for similar problems but no luck so far. Generated my own .so
> files from the .a that builds but it doesn't seem to work.
> Any advice?
If memory serves, .a in AIX *is* a dynamic library. I don't believe AIX follows the .so convention. If you're not sure, what does file(1) tell you?
As Frediano said, tsql doesn't use the shared libraries. The simplest test is to run the unit tests for dblib, or run bsqldb.
HTH.
--jkl
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues