Skip to content

unbuntu 18.04 release compile need cflags add '-fPIC' #315

@baiyfcu

Description

@baiyfcu

/usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(bio_ssl.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(d1_lib.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(d1_msg.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(d1_srtp.o): relocation R_X86_64_32 against .data' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(methods.o): relocation R_X86_64_32 against .rodata' can not be used when making a PIE object; recompile with -fPIC /usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(packet.o): relocation R_X86_64_32 against .rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /mnt/d/git/mediasoup-demo/server/node_modules/mediasoup/worker/out/Release/libopenssl.a(pqueue.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC

file "common.gypi"
'Release':
{
'cflags': [ '-g', '-Wno-unknown-warning-option']
}

to
'Release':
{
'cflags': [ '-g', '-Wno-unknown-warning-option','-fPIC' ]
}

recompile with -fPIC is ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions