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

collect2: error: ld returned 1 exit status #45

Open
ghost opened this issue Aug 23, 2021 · 1 comment
Open

collect2: error: ld returned 1 exit status #45

ghost opened this issue Aug 23, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 23, 2021

I am trying to compile manually but get the following error while trying make -j9
Logs:

/usr/bin/ld: objs/loop.o:/home/david/tg/loop.c:77: multiple definition of `verbosity'; objs/main.o:/home/david/tg/main.c:93: first defined here
/usr/bin/ld: objs/loop.o:/home/david/tg/loop.c:392: multiple definition of `wait_dialog_list'; objs/main.o:/home/david/tg/main.c:522: first defined here
/usr/bin/ld: objs/loop.o:/home/david/tg/loop.c:90: multiple definition of `register_mode'; objs/main.o:/home/david/tg/main.c:520: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:122: multiple definition of `msg_num_mode'; objs/main.o:/home/david/tg/main.c:94: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:135: multiple definition of `readline_active'; objs/loop.o:/home/david/tg/loop.c:390: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:125: multiple definition of `disable_colors'; objs/main.o:/home/david/tg/main.c:111: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:124: multiple definition of `permanent_peer_id_mode'; objs/main.o:/home/david/tg/main.c:125: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:121: multiple definition of `disable_auto_accept'; objs/main.o:/home/david/tg/main.c:521: first defined here
/usr/bin/ld: objs/interface.o:/home/david/tg/interface.c:123: multiple definition of `permanent_msg_id_mode'; objs/main.o:/home/david/tg/main.c:124: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:60: bin/telegram-cli] Error 1
@luroc
Copy link

luroc commented Oct 12, 2021

changing line 77 in loop.c from int verbosity to extern int verbosity and line 122 in interface.c from int msg_num_mode to extern int msg_num_mode seems to solve this for me. (as seen in this forum thread )

Take with a grain of salt, as I really don't have a clue about C.

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

1 participant