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

linker command failed with exit code 1: #3092

Closed
leonidaas opened this issue Aug 5, 2024 · 2 comments
Closed

linker command failed with exit code 1: #3092

leonidaas opened this issue Aug 5, 2024 · 2 comments
Labels
Component: build Related to the Makefiles / build scripts in the project. Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@leonidaas
Copy link

When I try to cmake and make the project on my Macbook Pro M1 with arm64 architecture i get the following error:

[ 11%] Building C object lib/CMakeFiles/libmosquitto.dir/packet_datatypes.c.o
[ 12%] Building C object lib/CMakeFiles/libmosquitto.dir/packet_mosq.c.o
[ 12%] Building C object lib/CMakeFiles/libmosquitto.dir/property_mosq.c.o
[ 13%] Building C object lib/CMakeFiles/libmosquitto.dir/read_handle.c.o
[ 13%] Building C object lib/CMakeFiles/libmosquitto.dir/send_connect.c.o
[ 14%] Building C object lib/CMakeFiles/libmosquitto.dir/send_disconnect.c.o
[ 14%] Building C object lib/CMakeFiles/libmosquitto.dir/send_mosq.c.o
[ 15%] Building C object lib/CMakeFiles/libmosquitto.dir/send_publish.c.o
[ 15%] Building C object lib/CMakeFiles/libmosquitto.dir/send_subscribe.c.o
[ 16%] Building C object lib/CMakeFiles/libmosquitto.dir/send_unsubscribe.c.o
[ 16%] Building C object lib/CMakeFiles/libmosquitto.dir/socks_mosq.c.o
[ 17%] Building C object lib/CMakeFiles/libmosquitto.dir/srv_mosq.c.o
[ 17%] Building C object lib/CMakeFiles/libmosquitto.dir/strings_mosq.c.o
[ 18%] Building C object lib/CMakeFiles/libmosquitto.dir/thread_mosq.c.o
[ 18%] Building C object lib/CMakeFiles/libmosquitto.dir/time_mosq.c.o
[ 19%] Building C object lib/CMakeFiles/libmosquitto.dir/tls_mosq.c.o
[ 19%] Building C object lib/CMakeFiles/libmosquitto.dir/utf8_mosq.c.o
[ 20%] Building C object lib/CMakeFiles/libmosquitto.dir/util_mosq.c.o
[ 20%] Building C object lib/CMakeFiles/libmosquitto.dir/util_topic.c.o
[ 20%] Building C object lib/CMakeFiles/libmosquitto.dir/will_mosq.c.o
[ 21%] Linking C shared library libmosquitto.dylib
ld: unknown options: --version-script=/Users/leon.fuessner/Workspace/mosquitto/lib/linker.version
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/libmosquitto.2.0.18.dylib] Error 1
make[1]: *** [lib/CMakeFiles/libmosquitto.dir/all] Error 2
make: *** [all] Error 2

Has anyone experienced something similiar?

@hpertaia
Copy link

Had same issue. Deleting --version-script link flag from lib/CMakeLists.txt fixes it.

As I understand, the reason it happens is because --version-script is a GNU linker flag, and mac linker doesn't support it.

@ralight ralight added this to the 2.0.20 milestone Oct 11, 2024
@ralight ralight added Type: Bug Component: build Related to the Makefiles / build scripts in the project. Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. labels Oct 11, 2024
@ralight
Copy link
Contributor

ralight commented Oct 11, 2024

This is fixed as in #3125

@ralight ralight closed this as completed Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: build Related to the Makefiles / build scripts in the project. Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

3 participants