1

i want to install cpanm WWW::Curl::Form on my Synology NAS. But that fails. Here is the output cpanm WWW::Curl::Form WWW::Curl::Easy File::Find::Rule String::CRC32 URI::Escape --> Working on WWW::Curl::Form Fetching http://www.cpan.org/authors/id/S/SZ/SZBALINT/WWW-Curl-4.17.tar.gz ... OK Configuring WWW-Curl-4.17 ... OK Building and testing WWW-Curl-4.17 ... FAIL ! Installing WWW::Curl::Form failed. See /var/services/homes/fox/.cpanm/work/1541095458.25803/build.log

the log file gives me:

make: i686-linux-gnu-ld: Command not found

But i dont know how to fix it on my Synology NAS (DSM 6.2 and appollolake architecture DS918+)

foxxx
  • 25
  • 5
  • Can you provide additional information about this NAS? Such as the CPU ISA / architecture, what type OS it uses, what is the output of the command `which ld` , the model / part number or SKU of the device. This information will be helpful. – Clay Raynor Nov 01 '18 at 18:37
  • DS918+, apollolake architecture, INTEL Celeron J3455 . And which ld is _/opt/bin/ld_ – foxxx Nov 02 '18 at 07:32
  • Also i've downloaded the synology toolchain for my architecture https://sourceforge.net/projects/dsgpl/files/DSM%206.2%20Tool%20Chains/Intel%20x86%20Linux%204.4.59%20%28Apollolake%29/ there is `x86_64-pc-linux-gnu-ld` but how to use that? Detailled error was `/bin/sh: i686-linux-gnu-ld: command not found make: *** [blib/arch/auto/WWW/Curl/Curl.so] Error 127 -> FAIL Installing WWW::Curl::Form failed. See /var/services/homes/fox/.cpanm/work/1541091249.20057/build.log for details. Retry with --force to force install it.` – foxxx Nov 02 '18 at 07:36

1 Answers1

0

After reviewing your additional comments, I believe I have potential solution. It looks like you are trying to install some Perl modules via the default Perl shell, cpan. As part of the installation process, the make utility is being executed. This utility is heavily used for compiling and building source from C and C++ source code, along with other languages.

The make utility is trying to call some executable i686-linux-gnu-ld which is a linker, see ld. A linker is a utility used in C programming for linking (combining) multiple compiled object files into a single executable binary. make is calling this utility as some sort of build process. Instead of calling i686-linux-gnu-ld it should probably just be calling ld. The only thing I am not sure about is why it is using the full name of the utility instead of ld.

I can think of two solutions. The first would be to update the make file to use the correct name for the linker. I'm not sure how you would do this when it is being installed via cpan since it is downloading a package and executing the make file before you have a chance to modify it. The other option is to create a symbolic link from the incorrect name and path of ld that the make file is using to the correct path /opt/bin/ld. This will result in ld being called when i686-linux-gnu-ld is called. Also, I forgot to mention it earlier but the which command will tell you where an executable / command is located on your shell's path.

The Stack Overflow post, How to symlink a file in Liunx?, gives a good explanation of how to create a symlink. You need to create a symlink to point to the correct name and path of the linker. To do so run the following command:

ln -s /opt/bin/ld /usr/bin/i686-linux-gnu-ld

Depending on the permissions of these directories you may need to run this command under a account with elevated permissions or via sudo. I apologize for this post being rather long and verbose. I just wanted to explain my solution in detail. I hope this helps. Please let me know if this doesn't resolve the problem.

edit: fixed typo in the command.

Clay Raynor
  • 316
  • 2
  • 8
  • Thank you for your detailled answer. But i got it not yet working. With your provided command i have now a symlink in /usr/bin pointing to _file_ . I tried to install but now i get that error `i686-linux-gnu-ld: unrecognized option '-Wl,-rpath,/opt/lib' i686-linux-gnu-ld: use the --help option for usage information make: *** [blib/arch/auto/WWW/Curl/Curl.so] Error 1` – foxxx Nov 02 '18 at 13:20
  • Sorry. That was a typo on my part. The command should have been `ln -s /opt/bin/ld /usr/bin/i686-linux-gnu-ld` I'll fix my answer. – Clay Raynor Nov 02 '18 at 15:11
  • Also interesting. Just found that `/opt/bin/ld -v` is `GNU ld (GNU Binutils) 2.19.1` and `~/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-ld -v` brings `GNU ld (crosstool-NG 1.20.0) Linaro 2015.01-2 2.25.0` – foxxx Nov 02 '18 at 16:53