• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved make doesn't recognize Makefile on FreeBSD 11

wrkilu

New Member


Messages: 11

#1
Hi,
After migrate some Makefile from FreeBSD6 to new one (FreeBSD11) make file doesn't work. Maybe this is caused by something else ? I don't know. Currently I have even such basic Makefile:
Code:
first:
        @bin/generator.pl
and after make command I get:
Code:
make: exec(bin/generator.pl) failed (No such file or directory)
*** Error code 1

Stop.
make: stopped in /etc/generator
Of course paths and folders are correct. Could somebody help me with that issue ? Thanks
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,692

#2
Does the first line (the 'shebang') of the Perl script refer to /usr/bin/perl perhaps? Perl used to have a symlink there that has since been removed, it's now /usr/local/bin/perl. If a script can't find the interpreter from the shebang line you get the rather cryptic "no such file or directory" error.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,508
Messages: 25,692

#4
Symlink shouldn't be there, you need to fix the script.

Code:
> pkg info -D perl5\*
perl5-5.24.2:
Always:
The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.