Good day,

The question is simple, but I don’t know where to dig ... I collect the pearl barley module from raw materials (basically from them, now the question is not in the tool).

on the first team

perl Makefile.PL 

getting

 perl Makefile.PLWarning (mostly harmless): No library found for -lperl 

Mindly, I can assume that there is no file with descriptions for pkg-config a la perl.pc, where the paths to the headers are indicated, any other compilation options. But for the pearl never had it.

The readme states that

Next, edit the LIBS and INC. You will also need a library search paths (-L) to JPEG, PNG, TIFF, etc.

I open the Makefile.PL, find the LIBS section and write there the path to libperl.so

 'LIBS' => [ "$LIBS_magick", "-L/usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi/CORE" ], 

and get quite predictable answer

 [root@mcenter mydir]# perl Makefile.PLWarning (mostly harmless): No library found for -lperl 

What to do? )

  • What is written in .configure and Makefile, which are created in temporary directories? By the way, is it possible in the Makefile.PL to pass a multi-element array as the value of 'LIBS', shouldn't you join first? Well, change the order of LIBS and LIBPATH too? - Dmitri Chubarov
  • I don’t see any configure at all .. but what exactly is of interest in the new Makefile? here it is pastebin.com/Gtmt4yXemassiv in LIBS can be, so it was originally written 'LIBS' => ["$ LIBS_magick"], I just added an element .. - Anton Shevtsov

1 answer 1

Perl modules are built using the autoconf / automake chain. Message

  Warning (mostly harmless): No library found for -lperl 

It is generated when the configure script configure when it tests the environment.

The following line from the Makefile indicates the cause of the message:

 # LIBS => [q[-L../magick/.libs -lMagickCore -lperl -lm -L/usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi/CORE], q[/usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi/CORE]] 

Thus, the $LIBS_magick variable $LIBS_magick . Since the scope of the -L option extends only to the library following in order, the compiler cannot find libperl.so . The next option should resolve the issue with the order of options.

 'LIBS' => [ join("-L/usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi/CORE","$LIBS_magick") ], 
  • Thank you for the detailed answer, but the result of the operations is exactly the same as before the edit of 'LIBS'. But the search for -lperl was overcome by creating the symlink /usr/lib64/libperl.so.5.14.1 -> /usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi/CORE/libperl.so as it didn't sound like an idiot, but it really works .. - Anton Shevtsov