|
|
This is what I get on FBSD 4.10:
make -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I. -g -O2
-D_THREAD_SAFE -pthread -c error.c
(and it compiles fine)
ls -l openvpn
-rwxr-xr-x 1 root wheel 1018798 Apr 3 18:01 openvpn
BUT, sorry, it seems make on FBSD, if you use the -D, it sets it to 1:
(shouldn't it have failed?)
make -D LOG_OPENVPN -VLOG_OPENVPN
1
(-V says 'what variable is this?)
So, FBSD, make wants to use this format:
make LOG_OPENVPN=RANDOM_CRAP_LKJLKJL (without the D)
And make STILL thinks live is fine: (again, -V will show variable)
make LOG_OPENVPN=RANDOM_CRAP_LKJLKJL -VLOG_OPENVPN
RANDOM_CRAP_LKJLKJL
Still compiles without complaining, so LOG_OPENVPN isn't being passed
somewhere, by somebody
Make sees it and passes it (best I can tell by the -V option)
This patch on Makefile works. Don't know why it works on yours without
patch.
Maybe something in ../configure on FBSD not setting things up right?
Patch released under GPL
With this patch, make LOG_OPENVPN=LOG_LOCAL6 compiles fine:
diff -bBru Makefile.orig Makefile
--- Makefile.orig Sun Apr 3 18:09:50 2005
+++ Makefile Sun Apr 3 18:14:46 2005
@@ -168,6 +168,9 @@
CC = gcc
CCDEPMODE = depmode=none
CFLAGS = -g -O2 -D_THREAD_SAFE -pthread
+.if defined(LOG_OPENVPN)
+CFLAGS += -DLOG_OPENVPN=${LOG_OPENVPN}
+.endif
CPP = gcc -E
CPPFLAGS = -I/usr/local/include -I.
CYGPATH_W = echo
make LOG_OPENVPN=RANDOM_CRAP_LKJLKJL
make all-am
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I. -g -O2
-D_THREAD_SAFE -pthread -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL -c base64.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I. -g -O2
-D_THREAD_SAFE -pthread -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL -c buffer.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I. -g -O2
-D_THREAD_SAFE -pthread -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL -c crypto.c
gcc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/local/include -I. -g -O2
-D_THREAD_SAFE -pthread -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL -c error.c
error.c: In function `open_syslog':
error.c:403: `RANDOM_CRAP_LKJLKJL' undeclared (first use in this
function)
error.c:403: (Each undeclared identifier is reported only once
error.c:403: for each function it appears in.)
*** Error code 1
make clean
make LOG_OPENVPN=LOG_LOCAL6
ls -l openvpn
-rwxr-xr-x 1 root wheel 1018798 Apr 3 18:20 openvpn
> -----Original Message-----
> From: openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx
> [mailto:openvpn-users-admin@xxxxxxxxxxxxxxxxxxxxx] On Behalf
> Of James Yonan
> Sent: Saturday, April 02, 2005 5:05 PM
> To: Michael Scheidell
> Cc: openvpn-users@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [Openvpn-users] -DLOG_OPENVPN might not be working
>
>
> On Tue, 1 Mar 2005, Michael Scheidell wrote:
>
> > Enhancement quest:
> > Add -D options from make CMDLINE to $CFLAGS.
> > OR honer LOG_OPENVPN=LOG_LOCAL6 in ./configure (have it add
> to CFLAGS
> > in
> > Makefile)
> >
> > On FBSD (ports, etc) if we do a 'make -DLOG_OPENVPN=LOG_LOCAL6' it
> > should be passing the -DLOG_OPENVPN=LOG_LOCAL to the
> makefile in the
> > $CFLAGS line (it doesn't seem to)
> >
> > openvpn rc12:
> >
> > make -DLOG_OPENVPN=LOG_LOCAL6
> >
> > Proof it doesn't pass make to cc: make
> > -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL (should error,
>
> It does [2.0-rc19]:
>
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I. -g -fno-inline -Wall
> -Wpointer-arith -Wsign-compare -Wno-unused-parameter
> -Wno-unused-function
> -DLOG_OPENVPN=RANDOM_CRAP_LKJLKJL -MT error.o -MD -MP -MF
> ".deps/error.Tpo" -c -o error.o error.c; \
> error.c: In function `open_syslog':
> error.c:403: error: `RANDOM_CRAP_LKJLKJL' undeclared (first
> use in this
> function)
> error.c:403: error: (Each undeclared identifier is reported only once
> error.c:403: error: for each function it appears in.)
>
> James
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from
> real users. Discover which products truly live up to the
> hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396> &op=click
>
> _______________________________________________
>
> Openvpn-users mailing list
> Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/openvpn-users
>
Warning: require_once(../../../archive_common.php) [function.require-once]: failed to open stream: No such file or directory in /home/openvpn/domains/openvpn.net/public_html/archive/openvpn-users/2005-04/msg00028.html on line 310
Fatal error: require_once() [function.require]: Failed opening required '../../../archive_common.php' (include_path='/usr/local/lib/php') in /home/openvpn/domains/openvpn.net/public_html/archive/openvpn-users/2005-04/msg00028.html on line 310
|