Re: gcc ignoring defined macros?

From: "Adam H(dot) Pendleton" <fmonkey(at)fmonkey(dot)net>
To: Dave Page <dpage(at)vale-housing(dot)co(dot)uk>
Cc: Hiroshi Saito <saito(at)inetrt(dot)skcapi(dot)co(dot)jp>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: gcc ignoring defined macros?
Date: 2003-10-06 17:25:55
Message-ID: 3F81A5A3.9020600@fmonkey.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Dave Page wrote:

>
>Ah-ha!!
>
>Right, I editted the line in src/Makefile that compiles frmConnect.cpp.
>I added -DSSL so the final command read:
>
>if g++ -DSSL -DHAVE_CONFIG_H -I. ........
>
>And that works. :-)
>
>Further investigation of the command line:
>
>if g++ -DHAVE_CONFIG_H -I. -I. -I..
>-DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g
>-I../src/include -I../src/agent/include -I -DSSL
>-I/usr/local/pgsql/include -I/usr/local/lib/wx/include/gtk2ud-2.5
>-D__WXDEBUG__ -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
>-I/usr/local/include -DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\"
>-Wall -g -I../src/include -I../src/agent/include -I -g -O2 -MT
>frmConnect.o -MD -MP -MF ".deps/frmConnect.Tpo" \
> -c -o frmConnect.o `test -f 'ui/frmConnect.cpp' || echo
>'./'`ui/frmConnect.cpp; \
>then mv ".deps/frmConnect.Tpo" ".deps/frmConnect.Po"; \
>else rm -f ".deps/frmConnect.Tpo"; exit 1; \
>fi
>
>shows up the problem. Firstly, a bunch of it seems to be included twice.
>Note the double inclusion of:
>
>-DDATA_DIR=\"/usr/local/pgadmin3/share/pgadmin3/\" -Wall -g
>-I../src/include -I../src/agent/include -I
>
>Then secondly, notice the -I on the end which does not have a path -
>that's what seems to be losing the SSL definition because it gets picked
>up as the argument to -I. Further investigation shows that that path is
>set to ${WXHOME} which is ovbviously empty when the command is created.
>Adding a / to the end of it makes things work nicely.
>
>Not sure about the best way to fix this properly, so I guess it's over
>to you Adam :-)
>
>Regards, Dave.
>
>
>
I was about to fix this, when I realized that I was about to add -DSSL
to the command-line for *all* situations. Is this what we want, or is
this supposed to be a conditional compile option? If it's needed for
*all* situations, then why included it at all, why not just remove the
#ifdefs and always compile the SSL code?

ahp

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Adam H. Pendleton 2003-10-06 18:24:03 CVS compile error
Previous Message Adam H. Pendleton 2003-10-06 15:06:54 Update