Compile errors

If you hit any installation issues or cannot connect to your freshly installed UnrealIRCd then this forum is for you.

Moderator: Supporters

Post Reply
Remco
Posts: 2
Joined: Sun Aug 11, 2019 9:01 am

Compile errors

Post by Remco » Sun Aug 11, 2019 9:05 am

Can anyone help me? Upon compiling i get this message, what problem does cause this?

/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
Makefile:62: recipe for target 'ircd' failed
make[1]: *** [ircd] Error 1
make[1]: Map '/home/remco/unrealircd-4.2.4.1/src' wordt verlaten
Makefile:140: recipe for target 'build' failed
make: *** [build] Error 2

Remco
Posts: 2
Joined: Sun Aug 11, 2019 9:01 am

Re: Compile errors

Post by Remco » Sun Aug 11, 2019 10:22 am

Solved it myself with the --without-system-argon2
parameter :)

tosser
Posts: 3
Joined: Mon Sep 30, 2019 12:14 pm

Re: Compile errors

Post by tosser » Mon Sep 30, 2019 12:33 pm

Please, help!
When compiling, have following errors:

Code: Select all

...
/usr/bin/ld: final link failed: nonrepresentable section on output
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:62: ircd] Error 1
make[1]: Leaving directory '/home/sakura/unrealircd-4.2.4.1/src'
make: *** [Makefile:141: build] Error 2
System data:
OS: PCLinuxOS 2019.08 TDE Mini (5.1.17-pclos1 #1 SMP Wed Jul 10 04:07:46 CDT 2019 x86_64 x86_64 x86_64 GNU/Linux)
CPU: Intel(R) Atom(TM) CPU D510 @ 1.66GHz
RAM: DDR2 2048 Mb

Note: compiling with argument --without-system-argon2 or without this argument cause identical errors.

Syzop
UnrealIRCd head coder
Posts: 1890
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Compile errors

Post by Syzop » Fri Oct 04, 2019 2:55 pm

I've never seen "final link failed: nonrepresentable section on output" before. Google shows some hits but... not sure.

Also, maybe you can post the rest of the output, the lines before the last 5 lines.

tosser
Posts: 3
Joined: Mon Sep 30, 2019 12:14 pm

Re: Compile errors

Post by tosser » Thu Oct 10, 2019 5:40 am

Of course!
Here is a link to CLI history (link will be active 7 days).
History as long as buffer can store.

Syzop
UnrealIRCd head coder
Posts: 1890
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Compile errors

Post by Syzop » Fri Oct 11, 2019 3:17 pm

Right, the 393 errors before the last one give a good clue :D

Code: Select all

...
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(a_bool.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: /usr/local/ssl/lib/libcrypto.a(bio_ndef.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: /usr/local/ssl/lib/libcrypto.a(asn_mime.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(bio_b64.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: /usr/local/ssl/lib/libcrypto.a(bio_asn1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
These errors are caused because a (presumably) self-compiled openssl library exists in /usr/local that was not compiled as a shared library. This is rather unusual. Most and probably all systems - and probably yours as well - have openssl located in /usr/lib or /lib as a shared library. So it's a bit odd you have another one in /usr/local that is not shared (.so) but static (.a).

A few options (pick 1 of them):
  • Drastic option: remove the /usr/local/ssl version, if you are sure no other program uses it.
  • Safest option: When ./Config asks you where openssl is located, you can answer /usr. This to force the normal openssl version from /usr, which presumably is fine, rather than use the one in /usr/local.
  • If you like neither option: Recompile the /usr/local/ssl version with 'shared' (this will enable -fPIC in openssl)

tosser
Posts: 3
Joined: Mon Sep 30, 2019 12:14 pm

Re: Compile errors

Post by tosser » Mon Oct 14, 2019 1:32 pm

Thanks a lot! :D
Problem solved, using third option - recompile openssl (./config -fPIC shared)

Post Reply