TDBC

View Ticket
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.
Ticket UUID: 28616c6f8cd7ec340cfc2e5230c1fe61dc81ea15
Title: tdbc bundled with tcl doesn't build on netbsd amd64
Status: Closed Type: Code_Defect
Severity: Critical Priority: Immediate
Subsystem: tdbc Resolution: Fixed
Last Modified: 2009-01-02 18:06:32
Version Found In: 1.0b1
Description:
compilation fails with the following message:

Building package 'tdbc' gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -I"/home/emiliano/src/tcl/generic" -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbc.c` -o tdbc.o gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -I"/home/emiliano/src/tcl/generic" -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcStubInit.c` -o tdbcStubInit.o gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1 -I"/home/emiliano/src/tcl/generic" -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c` -o tdbcTokenize.o /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c: In function 'Tdbc_TokenizeSql': /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:138: warning: array subscript has type 'char' /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:139: warning: array subscript has type 'char' /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:146: warning: array subscript has type 'char' rm -f libtdbc1.0b1.so gcc -shared -fPIC -o libtdbc1.0b1.so tdbc.o tdbcStubInit.o tdbcTokenize.o -L/home/emiliano/src/tcl/unix -ltclstub8.6 ld: tdbc.o: relocation R_X86_64_PC32 against `tdbcStubs' can not be used when making a shared object; recompile with -fPIC ld: final link failed: Bad value

this patch solves the problem --- ./pkgs/tdbc/generic/tdbcStubInit.c.orig 2008-12-23 02:04:46.000000000 -0200 +++ ./pkgs/tdbc/generic/tdbcStubInit.c 2008-12-23 02:08:14.000000000 -0200 @@ -17,7 +17,7 @@

/* !BEGIN!: Do not edit below this line. */

-TdbcStubs tdbcStubs = { +MODULE_SCOPE TdbcStubs tdbcStubs = { TCL_STUB_MAGIC, TDBC_STUBS_EPOCH, TDBC_STUBS_REVISION,


kennykb added on 2008-12-30 17:38:05:
Fixed in [651d34d627]