Bug 6370 – [RDMD] fails to link when using etc.c.sqlite3
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-07-23T08:08:00Z
Last change time
2013-03-10T00:12:24Z
Assigned to
nobody
Creator
michal.minich
Comments
Comment #0 by michal.minich — 2011-07-23T08:08:08Z
rdmd will not compile program that imports etc.c.sqlite3 while dmd with the same command line will.
test.d
import etc.c.sqlite3;
void main () {};
cmdline
rdmd test.d -c
Error:
module sqlite3_bindings from file dmd2/linux/bin64/../../src/phobos/etc/c/sqlite3.d conflicts with another module sqlite3_bindings from file dmd2/linux/bin64/../../src/phobos/etc/c/sqlite3.d
Comment #1 by dmitry.olsh — 2011-07-23T10:42:38Z
The root of the problem seems to be the wrong module name in etc/c/sqlite.d
Try to change it's first line to:
module etc.c.sqlite;
Comment #2 by michal.minich — 2011-07-23T10:50:07Z
dmd handles it well, rdmd ends with similar error
module etc.c.sqlite from file dmd2/linux/bin64/../../src/phobos/etc/c/sqlite3.d conflicts with another module sqlite from file dmd2/linux/bin64/../../src/phobos/etc/c/sqlite3.d
Comment #3 by dmitry.olsh — 2011-07-23T10:56:32Z
Sorry, I've botched it, that supposed to be etc.c.sqlite3, just like you import it
Comment #4 by michal.minich — 2011-07-23T11:08:19Z
No prob, I should pay more attention. (is the '3' really needed, I keep forgetting it)
Now it compiles ok, but fails to link with rdmd, I guess this is another problem, but I suppose when dmd handles it, rdmd should too.
Command:
rdmd -L-ldl -L/usr/lib/x86_64-linux-gnu/libsqlite3.a -w -debug -g Main.d
Output:
/usr/lib/x86_64-linux-gnu/libsqlite3.a(sqlite3.o):(.rodata+0x2950): multiple definition of `sqlite3_version'
/tmp/.rdmd/rdmd-Main.d-A0E982B2A9146FCDB47E9452DF01F7A4/Main.d.o:(.bss+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `sqlite3_version' changed from 8 in /tmp/.rdmd/rdmd-Main.d-A0E982B2A9146FCDB47E9452DF01F7A4/Main.d.o to 6 in /usr/lib/x86_64-linux-gnu/libsqlite3.a(sqlite3.o)
/usr/bin/ld: sqlite3_temp_directory: TLS definition in /tmp/.rdmd/rdmd-Main.d-A0E982B2A9146FCDB47E9452DF01F7A4/Main.d.o section .tbss mismatches non-TLS definition in /usr/lib/x86_64-linux-gnu/libsqlite3.a(sqlite3.o) section .bss
/usr/lib/x86_64-linux-gnu/libsqlite3.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
--- errorlevel 1
Comment #5 by dlang-bugzilla — 2013-03-10T00:12:24Z
IIRC these were bugs in the etc.c.sqlite3 module that I've fixed a while ago.