{"action":"closed","issue":{"url":"https://api.github.com/repos/alanxz/rabbitmq-c/issues/537","repository_url":"https://api.github.com/repos/alanxz/rabbitmq-c","labels_url":"https://api.github.com/repos/alanxz/rabbitmq-c/issues/537/labels{/name}","comments_url":"https://api.github.com/repos/alanxz/rabbitmq-c/issues/537/comments","events_url":"https://api.github.com/repos/alanxz/rabbitmq-c/issues/537/events","html_url":"https://github.com/alanxz/rabbitmq-c/issues/537","id":378218623,"node_id":"MDU6SXNzdWUzNzgyMTg2MjM=","number":537,"title":"How to compile with Position Independent Code?","user":{"login":"waas1919","id":33501069,"node_id":"MDQ6VXNlcjMzNTAxMDY5","avatar_url":"https://avatars3.githubusercontent.com/u/33501069?v=4","gravatar_id":"","url":"https://api.github.com/users/waas1919","html_url":"https://github.com/waas1919","followers_url":"https://api.github.com/users/waas1919/followers","following_url":"https://api.github.com/users/waas1919/following{/other_user}","gists_url":"https://api.github.com/users/waas1919/gists{/gist_id}","starred_url":"https://api.github.com/users/waas1919/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waas1919/subscriptions","organizations_url":"https://api.github.com/users/waas1919/orgs","repos_url":"https://api.github.com/users/waas1919/repos","events_url":"https://api.github.com/users/waas1919/events{/privacy}","received_events_url":"https://api.github.com/users/waas1919/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-11-07T10:03:10Z","updated_at":"2018-11-08T10:32:18Z","closed_at":"2018-11-08T10:32:17Z","author_association":"NONE","body":"Hi all\r\n\r\nI want to compile this rabbitmq-c as a static library with position independent code (-fPIC / -no-pie) using the CMakeLists.txt and then use the output librabbitmq.a inside a personal shared library (*.so)\r\n\r\nWhat do I need to change on the CMakelLists.txt in order to make this work?\r\n\r\nI always get the error when I try to compile my shared library (*.so) that contains the static library from rabbiqmq-c:\r\n\r\n[ 50%] Building CXX object CMakeFiles/MyRabbitMq.dir/src/lib/int/rabbitmq.cpp.o\r\n[100%] Linking CXX shared library MyRabbitMq.so\r\n/usr/bin/ld: /var/tmp/src/08af7af7-4618-4131-a64d-e993e1c6e53c/Linux-Release/ext/libs/librabbitmq.a(amqp_framing.c.o): relocation R_X86_64_PC32 against symbol `amqp_empty_bytes' can not be used when making a shared object; recompile with -fPIC\r\n/usr/bin/ld: final link failed: Bad value\r\ncollect2: error: ld returned 1 exit status\r\nCMakeFiles/MyRabbitMq.dir/build.make:85: recipe for target 'libMyRabbitMq.so' failed"}}
{"actor":{"display_login":"waas1919"}}