Skip to content

Can't compile  #9

Closed
Closed
@Noxivs

Description

@Noxivs

Hi,
i'm new in rust programming and i'm trying to use the native lib postgres for rust. But i can't compile this openssl lib.
I used this version http://gnuwin32.sourceforge.net/packages/openssl.htm and the last. Same error in both cases. Is missing some libraries in the make file?

(Windows 7 / msys / mingw 32 bits)

$ make
mkdir -p build
rustc -O --cfg ndebug  --dep-info build/openssl.d --out-dir build lib.rs
←[31merror: ←[0m←[1mlinking with `gcc` failed: exit code: 1
←[0m←[32mnote: ←[0m←[1mgcc arguments: '-m32' '-LC:\Program Files (x86)\Rust\bin\
rustlib\i686-pc-mingw32\lib' '-o' 'build\openssl-06cd96fd-0.0.dll' 'build\openss
l.o' '-lmorestack' 'build\openssl.metadata.o' '-shared-libgcc' '-Wl,--enable-lon
g-section-names' '-LC:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib'
 '-lsync-e32f1ba2-0.11-pre' '-LC:\Program Files (x86)\Rust\bin\rustlib\i686-pc-m
ingw32\lib' '-lstd-aad93cea-0.11-pre' '-LC:\Program Files (x86)\Rust\bin\rustlib
\i686-pc-mingw32\lib' '-llibc-3574b280-0.11-pre' '-LC:\Programming\rust-postgres
\submodules\rust-openssl\.rust' '-LC:\Programming\rust-postgres\submodules\rust-
openssl' '-Wl,-Bdynamic' '-lssl' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lc
rypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-l
crypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-
lgcc_s' '-shared' '-lcompiler-rt'
←[0m←[32mnote: ←[0m←[1mC:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:
(.text+0xca): undefined reference to `shutdown@8'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0xd4): undefined
 reference to `closesocket@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x1b1): undefine
d reference to `shutdown@8'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x1bb): undefine
d reference to `closesocket@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x231): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x287): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x29b): undefine
d reference to `recv@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x2c9): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x30c): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x324): undefine
d reference to `send@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x359): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3ae): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3be): undefine
d reference to `send@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3e9): undefine
d reference to `WSAGetLastError@0'
c:/Programming/MinGw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-
mingw32/bin/ld.exe: C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o): bad reloc add
ress 0x4 in section `.data'
collect2.exe: error: ld returned 1 exit status

←[0m←[31merror: ←[0m←[1maborting due to previous error
←[0mmake: *** [build/openssl-06cd96fd-0.0.dll] Error 101

Regards,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions