Package: libev-dev
Version: 1:4.22-1
Severity: important

Dear Maintainer,

When come to static link libev, the ld shows:
gcc test.c -Wl,-Bstatic -lev -Wl,-Bdynamic -lm
/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libev.a(ev.o): 
relocation R_X86_64_32 against `.rodata' can not be used when making a shared 
object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

the test.c is taken from someone's gist, 
https://gist.github.com/amghost/0d8422c5c63ec39999fe
I checked the debian/rules, but I don't know why the -fPIC is missed.

-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libev-dev depends on:
ii  libev4  1:4.22-1

libev-dev recommends no packages.

libev-dev suggests no packages.

-- no debconf information

Attachment: signature.asc
Description: PGP signature

Reply via email to