Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing fPIC from examples and tests #49

Open
kallisti5 opened this issue Feb 3, 2021 · 3 comments
Open

missing fPIC from examples and tests #49

kallisti5 opened this issue Feb 3, 2021 · 3 comments

Comments

@kallisti5
Copy link

CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON

global fPIC is on, however..

/mtxclient> find . -name link.txt -exec grep -H fPIC {} \;

./build/CMakeFiles/matrix_client.dir/link.txt:/bin/c++ -fPIC            -Wall           -Wextra                 -pipe           -pedantic               -fsized-deallocation            -fdiagnostics-color=always              -Wno-attributes                -Wunreachable-code -shared -Wl,-soname,libmatrix_client.so.0.4.1 -o libmatrix_client.so.0.4.1 CMakeFiles/matrix_client.dir/lib/http/client.cpp.o CMakeFiles/matrix_client.dir/lib/http/session.cpp.o CMakeFiles/matrix_client.dir/lib/crypto/client.cpp.o CMakeFiles/matrix_client.dir/lib/crypto/encoding.cpp.o CMakeFiles/matrix_client.dir/lib/crypto/types.cpp.o CMakeFiles/matrix_client.dir/lib/crypto/utils.cpp.o CMakeFiles/matrix_client.dir/lib/utils.cpp.o CMakeFiles/matrix_client.dir/lib/log.cpp.o CMakeFiles/matrix_client.dir/lib/structs/common.cpp.o CMakeFiles/matrix_client.dir/lib/structs/errors.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events.cpp.o CMakeFiles/matrix_client.dir/lib/structs/identifiers.cpp.o CMakeFiles/matrix_client.dir/lib/structs/pushrules.cpp.o CMakeFiles/matrix_client.dir/lib/structs/requests.cpp.o CMakeFiles/matrix_client.dir/lib/structs/secret_storage.cpp.o CMakeFiles/matrix_client.dir/lib/structs/user_interactive.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/aliases.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/avatar.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/canonical_alias.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/collections.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/common.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/create.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/encrypted.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/encryption.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/guest_access.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/history_visibility.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/join_rules.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/member.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/name.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/pinned_events.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/power_levels.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/presence.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/reaction.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/redaction.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/tag.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/tombstone.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/topic.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/unknown.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/voip.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/account_data/fully_read.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/ephemeral/receipt.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/ephemeral/typing.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/nheko_extensions/hidden_events.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/audio.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/emote.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/file.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/image.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/notice.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/text.cpp.o CMakeFiles/matrix_client.dir/lib/structs/events/messages/video.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/common.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/create_room.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/crypto.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/empty.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/groups.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/login.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/media.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/messages.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/notifications.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/profile.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/register.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/sync.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/turn_server.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/version.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/well-known.cpp.o CMakeFiles/matrix_client.dir/lib/structs/responses/public_rooms.cpp.o  -Wl,-rpath,/boot/system/lib:/packages/olm-3.1.4-1/.self/lib: /boot/system/lib/libboost_iostreams.so.1.70.0 /boot/system/lib/libboost_system.so.1.70.0 /boot/system/lib/libboost_thread.so.1.70.0 /packages/openssl-1.1.1i-1/.self/develop/lib/libcrypto.so /packages/openssl-1.1.1i-1/.self/develop/lib/libssl.so /packages/olm-3.1.4-1/.self/lib/libolm.so.3.1.4 /packages/openssl-1.1.1i-1/.self/develop/lib/libcrypto.so 

-fPIC only shows up on the shared library. The build fails due to fPIC issues between boost and various matrix components.

@kallisti5
Copy link
Author

Compiling, disabling the tests and examples fixes the wall of fPIC errors...

cmake -S. -Bbuild -DBUILD_LIB_TESTS=OFF -DBUILD_LIB_EXAMPLES=OFF
cmake --build build -j16

@deepbluev7
Copy link
Member

That's curious, I don't think we do anything special on the package, that should cause this. Definitely not intentional.

@kallisti5
Copy link
Author

yeah.. it's a weird one. I can "force" fPIC via CMAKE_CXX_FLAGS/CMAKE_LD_FLAGS in the examples to solve it there.

cmake 3.19.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants