how to bootstrap libtool?

Chuck Swiger cswiger at mac.com
Wed Feb 9 19:11:56 UTC 2011


On Feb 9, 2011, at 10:35 AM, Michael Scheidell wrote:
> On 2/9/11 1:32 PM, Chuck Swiger wrote:
>> You should list libnet11 as both BUILD_DEPENDS and RUN_DEPENDS, likely...
> 
> I do.
> 
> didn't help (specifically referring to the new 2.9.0.3 security/snort port)
> 
> I THINK this cludge helped: but I am not happy with it.  not sure I understand portlint complaints about !=, or if there is/was a better way.


Running portlint shows both the issue and an URL for the recommended approach:

# cd /usr/ports/security/snort ; portlint
/usr/local/bin/libnet11-config: not found
"Makefile", line 63: warning: "/usr/local/bin/libnet11-config --cflags" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 64: warning: "/usr/local/bin/libnet11-config --libs" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 63: warning: "/usr/local/bin/libnet11-config --cflags" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 64: warning: "/usr/local/bin/libnet11-config --libs" returned non-zero status
WARN: Makefile: [63]: use of != in assignments is almost never a good thing to do.  Try to avoid using them.  See http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for some helpful hints on what to do instead.
WARN: Makefile: possible use of absolute pathname "/var/log/snort".
0 fatal errors and 2 warnings found.

The problem with != is that is is evaluated in a subshell regardless of whether the results are needed, and it happens while the Makefile is first being read, before it tries to figure out which targets need to be processed.  This is why setting libnet in BUILD_DEPENDS isn't being processed until after these commands are run (or fail to run, as above).

GNU Make refers to the distinction as "immediate" vs. "deferred", and you want to use the latter where possible.

Regards,
-- 
-Chuck



More information about the freebsd-ports mailing list