Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2008 13:47:32 +0200 (CEST)
From:      "Ganael LAPLANCHE" <ganael.laplanche@martymac.com>
To:        bug-followup@FreeBSD.org, pav@FreeBSD.org, ganael.laplanche@martymac.com, freebsd-multimedia@FreeBSD.org, pav@FreeBSD.org
Subject:   Re: ports/123327: Port fix: graphics/libcaca - CONFIGURE_ENV incorrectly set
Message-ID:  <20080619112038.M77482@martymac.com>
In-Reply-To: <200806191004.m5JA4575024903@freefall.freebsd.org>
References:  <200806191004.m5JA4575024903@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 19 Jun 2008 10:04:05 GMT, pav wrote

Hi Pav,

> Why is this patch needed? It builds without the patch, and manages to 
> link to ncursesw.

Without this patch, special LDFLAGS are simply overridden because appended a
second time to CONFIGURE_ENV by bsd.efl.mk :

# In bsd.efl.mk :
#[...]
#
# Initialize configure enviropment
#
CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \
                CFLAGS="-I${LOCALBASE}/include ${CFLAGS}" \
                LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
#[...]

This leads to loosing '-lm -lncurses' in LDFLAGS. The solution is to set those
two flags in ${LDFLAGS} rather than directly in CONFIGURE_ENV.

make -V CONFIGURE_ENV shows this :

CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -lm -lncurses" [...]
LDFLAGS="-L/usr/local/lib " [...]

(Note that there is the same problem with CPPFLAGS and CFLAGS.)

You can reproduce this bug by building vlock with CACASAVER option set to ON and
try to launch 'vlock -n -t 5 caca' after having added your account to group
vlock:*:129:. It fails to load the screen saver, unless this patch is used...

Best regards,

Ganaël LAPLANCHE
ganael.laplanche@martymac.com
http://www.martymac.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080619112038.M77482>