macport wxt problem

Mojca Miklavec mojca.miklavec.lists at gmail.com
Mon Aug 27 00:39:08 PDT 2012


On Mon, Aug 27, 2012 at 8:44 AM, Peter wrote:
>> when I compile gnuplot 4.6 with macport wxt in mac os x 10.6 with xcode_4.2, my macport was self updated to the latest version.
>
>> I got the following errors. In file included from ./plot.h:46,
>>
>>                  from wxterminal/wxt_gui.h:113,
>>                  from wxterminal/wxt_gui.cpp:96:
>> ./mouse.h:189: error: variable or field 'set_ruler' declared void
>> ./mouse.h:189: error: '_Bool' was not declared in this scope
>
>>> Weird. That is (most probably) the same known problem as I reported to
>>> gnuplot devs a while ago, it's a bug in older autoconf tools - the
>>> ones used to generate ./configure script for Gnuplot 4.6, but I
>>> thought I addressed it as part of the patch-configure-qt.diff:
>  >> http://trac.macports.org/browser/trunk/dports/math/gnuplot/files/patch-configure-qt.diff
>>> or at least it works on Lion. I can only guess what is going on with 10.6.
>
>>> May I please ask you for the output of "port -v configure gnuplot <any
>>> variants>" to see what it reports for these two lines in particular:
>
>>> checking for stdbool.h that conforms to C99... yes
>>> checking for _Bool... yes
>
> I run the following command to compile Gnuplot.
>
> sudo /opt/local/bin/port install cairo +no_x11 +quartz +universal
>  sudo /opt/local/bin/port install pango +no_x11 +quartz +universal
>   ./configure CPPFLAGS='-arch i386' LDFLAGS='-arch i386' --with-readline=builtin  --prefix=$HOME/gnuplot-4.6_bin --without-lisp-files

I was missing the fact that you compiled for i386 only (it was
implicit, I just didn't think about it). However that should not
really change anything.

>  Here is the result.
>
> checking for stdbool.h that conforms to C99... no

This is a different story then. On 10.7 I get "yes".

> checking for _Bool... yes

> ./mouse.h:189: error: '_Bool' was not declared in this scope

This makes me wonder if that is not the same of exactly the same
situation under sparc solaris, where C knows about _Bool and C++
doesn't. Autoconf checks if _Bool exists under C compiler and then
assumes that C++ has _Bool defined *exactly* when it is also defined
under C++. And that makes problems.

See
    http://lists.gnu.org/archive/html/autoconf/2012-08/msg00059.html
(unanswered so far)
    http://sourceforge.net/tracker/?func=detail&aid=3538084&group_id=2055&atid=102055

Can you please try the following patch (this is just ugly workaround -
just to see if it works)?

--- src/syscfg.h
+++ src/syscfg.h
@@ -342,13 +342,13 @@ typedef RETSIGTYPE (*sigfunc)__PROTO((void));
 #if HAVE_STDBOOL_H
 # include <stdbool.h>
 #else
-# if ! HAVE__BOOL
+//# if ! HAVE__BOOL
 #  ifdef __cplusplus
 typedef bool _Bool;
 #  else
-typedef unsigned char _Bool;
+//typedef unsigned char _Bool;
 #  endif
-# endif
+//# endif
 # define bool _Bool
 # define false 0
 # define true 1


>>> Are you able to test if gnuplot *with* qt and *without* wxwidgets compiles?
>
> $  sudo /opt/local/bin/port install qt4-mac-devel +no_x11 +quartz +universal
> ....
> --->  Building qt4-mac-devel
>
>
> It hangs up for 3 hours in the stage of "Building qt4-mac-devel". not sure what is missed or it is normal?

It's probably normal. Qt builds for a very very very long time and it
usually helps to install the default variant from binary packages (I'm
not sure if +universal variant also exists as pre-compiled and I'm not
sure if binary packages exist for 10.6). You could use
    port -v install qt4-mac
to see "the progress". Also, if you don't compile with wxWidgets or if
you compile with wxWidgets-devel, there's no real need to install
gnuplot as i386-only.

Mojca


More information about the macports-users mailing list