Alessandro has asked for the wisdom of the Perl Monks concerning the following question:

Hello all, first I would like to apologize if I am making any English mistakes, I am not a native speaker. Then, I have a problem with installing perl. My os is OS X Yosemite 10.10.5. It comes with preinstalled perl version 5.16.3. I still wanted to install a more recent version of perl... But I am unable to do so. I always get into the same error, whatever I try to install it (either using Perlbrew or trying to compile myself from the terminal with the "make" command). The error is the following: (I just put here the end of the log file displaying the error) :
" ld: library not found for -lgcc_s.10.4 clang: error: linker command failed with exit code 1 (use -v to see in +vocation) make[1]: *** [../../lib/auto/B/B.bundle] Error 1 rm -f ../../lib/auto/B/B.bundle env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_looku +p -L/usr/local/lib -L/opt/local/lib -fstack-protector-strong B.o -o +../../lib/auto/B/B.bundle \ \ ld: library not found for -lgcc_s.10.4 clang: error: linker command failed with exit code 1 (use -v to see in +vocation) make[1]: *** [../../lib/auto/B/B.bundle] Error 1 Unsuccessful make(ext/B): code=512 at make_ext.pl line 574. make: *** [lib/auto/B/B.bundle] Error 25 "
This is just driving me crazy as I have no idea of how to solve it. I have to add I have installed XCode and command lines tool for os x, that should include all I need for perl compilation (at least this is my understanding). Thank you monks for any clue on how to solve that problem. PS: I have tried to be as clear as possible and include all relevant information, let me know if something is missing.

Replies are listed 'Best First'.
Re: Unable to compile perl
by Anonymous Monk on Nov 19, 2015 at 00:02 UTC
    which version of clang do you have? do you have ...gcc_s...so file anywhere? where?
      The clang version is: "Apple LLVM version 6.1.0 (clang-602.0.49)".
      I have a gcc file in /usr/bin/gcc but can't find any gcc_s, at least "which gcc_s" doesn't return anything.

        which usually searches for (executable) commands based on $PATH.

        The other related command is locate, which I have given up on due to it consulting stale data, skipping some paths, different implementations, poorly implemented wrapper around it (the worst). When I need to locate a file, I reach for find. locate can die already for all I care.

        If gcc is in /use/bin, try searching in /usr/lib: find /usr/lib -name '*gcc_s* (feel free to adjust).