|
From: Brian W. <bri...@gm...> - 2015-08-03 16:40:34
|
Hello, I am trying to build gunplot on a Mac via macports and I get the following error: :info:build In file included from term.c:1194: :info:build In file included from ./term.h:254: :info:build ../term/caca.trm:2514:3: warning: implicit declaration of function 'process_event' is invalid in C99 [-Wimplicit-function-declaration] :info:build process_event(GE_replot, 0, 0, 0, 0, 0); :info:build ^ :info:build ../term/caca.trm:2514:17: error: use of undeclared identifier 'GE_replot' :info:build process_event(GE_replot, 0, 0, 0, 0, 0); :info:build ^ Has this issue been encountered and/or resolved by anyone else? Any help or information is appreciated. Thanks. P.S. I had sent this message before confirming my subscription to the mailing list. I apologize if this comes through as a duplicate. -- Brian D. Weitzner Postdoctoral Fellow Chemical & Biomolecular Engineering Johns Hopkins University Baltimore, Maryland 21218 http://graylab.jhu.edu <http://graylab.jhu.edu/> |
|
From: Daniel J S. <dan...@ie...> - 2015-08-03 17:54:20
|
On 08/03/2015 11:40 AM, Brian Weitzner wrote:
> Hello,
>
> I am trying to build gunplot on a Mac via macports and I get the
> following error:
>
> :info:build In file included from term.c:1194:
> :info:build In file included from ./term.h:254:
> :info:build ../term/caca.trm:2514:3: warning: implicit declaration of
> function 'process_event' is invalid in C99 [-Wimplicit-function-declaration]
> :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
> :info:build ^
> :info:build ../term/caca.trm:2514:17: error: use of undeclared
> identifier 'GE_replot'
> :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
> :info:build ^
>
> Has this issue been encountered and/or resolved by anyone else? Any help
> or information is appreciated. Thanks.
I can only guess, but it is likely that some of the pre-processor
conditionals are set up correctly. For example, in caca.trm is the
following:
#ifdef USE_MOUSE
static TBOOLEAN process_event(char type, int mx, int my, int par1, int
par2, int winid); /* wrapper for do_event() */
#endif
Implicit declaration would suggest this declaration isn't being
included. Is USE_MOUSE defined in your case? (Check the config.log file.)
In fact that does look to be a problem. All cases of process_event()
calls appear to be protected by
#ifdef USE_MOUSE
#endif /* USE_MOUSE */
except this one is not:
TERM_PUBLIC void
CACA_modify_plots(unsigned int operations, int plotno)
{
[snip]
if (changed) {
/* Replot only if something changed. */
CACA_zoom_or_replot = TRUE;
process_event(GE_replot, 0, 0, 0, 0, 0);
}
}
This whole routine is not needed so it too could be conditioned out with
#ifdef USE_MOUSE, but that factors into the function table construction,
so it's best to let Ethan deal with that.
I think for the time being you should ensure that USE_MOUSE is defined
via the configuration process.
Dan
|
|
From: Brian W. <bri...@gm...> - 2015-08-03 18:08:37
|
> On Aug 3, 2015, at 1:54 PM, Daniel J Sebald <dan...@ie...> wrote:
>
> On 08/03/2015 11:40 AM, Brian Weitzner wrote:
>> Hello,
>>
>> I am trying to build gunplot on a Mac via macports and I get the
>> following error:
>>
>> :info:build In file included from term.c:1194:
>> :info:build In file included from ./term.h:254:
>> :info:build ../term/caca.trm:2514:3: warning: implicit declaration of
>> function 'process_event' is invalid in C99 [-Wimplicit-function-declaration]
>> :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
>> :info:build ^
>> :info:build ../term/caca.trm:2514:17: error: use of undeclared
>> identifier 'GE_replot'
>> :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
>> :info:build ^
>>
>> Has this issue been encountered and/or resolved by anyone else? Any help
>> or information is appreciated. Thanks.
>
> I can only guess, but it is likely that some of the pre-processor conditionals are set up correctly. For example, in caca.trm is the following:
>
> #ifdef USE_MOUSE
> static TBOOLEAN process_event(char type, int mx, int my, int par1, int par2, int winid); /* wrapper for do_event() */
> #endif
>
> Implicit declaration would suggest this declaration isn't being included. Is USE_MOUSE defined in your case? (Check the config.log file.)
>
> In fact that does look to be a problem. All cases of process_event() calls appear to be protected by
>
> #ifdef USE_MOUSE
> #endif /* USE_MOUSE */
>
> except this one is not:
>
> TERM_PUBLIC void
> CACA_modify_plots(unsigned int operations, int plotno)
> {
> [snip]
> if (changed) {
> /* Replot only if something changed. */
> CACA_zoom_or_replot = TRUE;
> process_event(GE_replot, 0, 0, 0, 0, 0);
> }
> }
>
> This whole routine is not needed so it too could be conditioned out with #ifdef USE_MOUSE, but that factors into the function table construction, so it's best to let Ethan deal with that.
>
> I think for the time being you should ensure that USE_MOUSE is defined via the configuration process.
>
> Dan
Thanks, Dan. Looking through config.log, I found the following:
configure:16459: result: Mouse support in interactive terminals: no
That’s the only mention of mouse support in the output. At least within the MacPorts system, it is unclear how to change the setting and still get things going.
--
Brian D. Weitzner
Postdoctoral Fellow
Chemical & Biomolecular Engineering
Johns Hopkins University
Baltimore, Maryland 21218
http://graylab.jhu.edu <http://graylab.jhu.edu/>
|
|
From: Ethan A M. <sf...@us...> - 2015-08-03 18:08:10
|
On Monday, 03 August, 2015 12:40:22 Brian Weitzner wrote: > Hello, > > I am trying to build gunplot on a Mac via macports and I get the following error: > > :info:build In file included from term.c:1194: > :info:build In file included from ./term.h:254: > :info:build ../term/caca.trm:2514:3: warning: implicit declaration of function 'process_event' is invalid in C99 [-Wimplicit-function-declaration] > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); > :info:build ^ > :info:build ../term/caca.trm:2514:17: error: use of undeclared identifier 'GE_replot' > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); > :info:build ^ > > Has this issue been encountered and/or resolved by anyone else? Any help or information is appreciated. I don't know why it is failing, but the simplest fix is to disable the caca terminal ./configure --without-caca It's a "just-for-fun" option that you don't need for anything serious. I am somewhat surprised that your machine even has libcaca installed to begin with. Ethan |
|
From: Brian W. <bri...@gm...> - 2015-08-03 18:15:41
|
> On Aug 3, 2015, at 2:07 PM, Ethan A Merritt <sf...@us...> wrote: > > On Monday, 03 August, 2015 12:40:22 Brian Weitzner wrote: > > Hello, > > > > I am trying to build gunplot on a Mac via macports and I get the following error: > > > > :info:build In file included from term.c:1194: > > :info:build In file included from ./term.h:254: > > :info:build ../term/caca.trm:2514:3: warning: implicit declaration of function 'process_event' is invalid in C99 [-Wimplicit-function-declaration] > > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); > > :info:build ^ > > :info:build ../term/caca.trm:2514:17: error: use of undeclared identifier 'GE_replot' > > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); > > :info:build ^ > > > > Has this issue been encountered and/or resolved by anyone else? Any help or information is appreciated. > > I don't know why it is failing, but the simplest fix is to > disable the caca terminal > > ./configure --without-caca > > It's a "just-for-fun" option that you don't need for anything serious. > I am somewhat surprised that your machine even has libcaca installed > to begin with. > > Ethan For reasons unknown, libcaca is listed as a dependency by MacPorts, so everyone who gets gnuplot that way has libcaca. -- Brian D. Weitzner Postdoctoral Fellow Chemical & Biomolecular Engineering Johns Hopkins University Baltimore, Maryland 21218 http://graylab.jhu.edu <http://graylab.jhu.edu/> |
|
From: Daniel J S. <dan...@ie...> - 2015-08-03 18:30:54
|
On 08/03/2015 01:15 PM, Brian Weitzner wrote:
>
>> On Aug 3, 2015, at 2:07 PM, Ethan A Merritt
>> <sf...@us... <mailto:sf...@us...>> wrote:
>>
>> On Monday, 03 August, 2015 12:40:22 Brian Weitzner wrote:
>> > Hello,
>> >
>> > I am trying to build gunplot on a Mac via macports and I get the
>> following error:
>> >
>> > :info:build In file included from term.c:1194:
>> > :info:build In file included from ./term.h:254:
>> > :info:build ../term/caca.trm:2514:3: warning: implicit declaration of
>> function 'process_event' is invalid in C99
>> [-Wimplicit-function-declaration]
>> > :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
>> > :info:build ^
>> > :info:build ../term/caca.trm:2514:17: error: use of undeclared
>> identifier 'GE_replot'
>> > :info:build process_event(GE_replot, 0, 0, 0, 0, 0);
>> > :info:build ^
>> >
>> > Has this issue been encountered and/or resolved by anyone else? Any
>> help or information is appreciated.
>>
>> I don't know why it is failing, but the simplest fix is to
>> disable the caca terminal
>>
>> ./configure --without-caca
>>
>> It's a "just-for-fun" option that you don't need for anything serious.
>> I am somewhat surprised that your machine even has libcaca installed
>> to begin with.
>>
>> Ethan
>
> For reasons unknown, libcaca is listed as a dependency by MacPorts, so
> everyone who gets gnuplot that way has libcaca.
If you want to try a quick hack to make compilation continue, condition
out the code within CACA_modify_plots in the file term/caca.trm:
TERM_PUBLIC void
CACA_modify_plots(unsigned int operations, int plotno)
{
#if 0
<all code within routine>
#endif
}
Dan
|
|
From: Brian W. <bri...@gm...> - 2015-08-03 18:33:09
|
> On Aug 3, 2015, at 2:15 PM, Brian Weitzner <bri...@gm...> wrote: > > >> On Aug 3, 2015, at 2:07 PM, Ethan A Merritt <sf...@us... <mailto:sf...@us...>> wrote: >> >> On Monday, 03 August, 2015 12:40:22 Brian Weitzner wrote: >> > Hello, >> > >> > I am trying to build gunplot on a Mac via macports and I get the following error: >> > >> > :info:build In file included from term.c:1194: >> > :info:build In file included from ./term.h:254: >> > :info:build ../term/caca.trm:2514:3: warning: implicit declaration of function 'process_event' is invalid in C99 [-Wimplicit-function-declaration] >> > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); >> > :info:build ^ >> > :info:build ../term/caca.trm:2514:17: error: use of undeclared identifier 'GE_replot' >> > :info:build process_event(GE_replot, 0, 0, 0, 0, 0); >> > :info:build ^ >> > >> > Has this issue been encountered and/or resolved by anyone else? Any help or information is appreciated. >> >> I don't know why it is failing, but the simplest fix is to >> disable the caca terminal >> >> ./configure --without-caca >> >> It's a "just-for-fun" option that you don't need for anything serious. >> I am somewhat surprised that your machine even has libcaca installed >> to begin with. >> >> Ethan > > > For reasons unknown, libcaca is listed as a dependency by MacPorts, so everyone who gets gnuplot that way has libcaca. > > -- > Brian D. Weitzner > Postdoctoral Fellow > Chemical & Biomolecular Engineering > Johns Hopkins University > Baltimore, Maryland 21218 > http://graylab.jhu.edu <http://graylab.jhu.edu/> I found the following line in the main.log produced by MacPorts: line 108: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_gnuplot/gnuplot/work/gnuplot-5.0.1" && ./configure --prefix=/opt/local --with-caca=/opt/local --with-gd=/opt/local --with-readline=/opt/local --with-aquaterm --without-x --infodir='${prefix}/share/info' --mandir='${prefix}/share/man' --disable-wxwidgets --without-bitmap-terminals --without-cairo --without-latex --without-lua --without-pdf --without-qt --without-tutorial --with-cwdrc I ran the port command, let the build fail and then executed configure with the caca lib definition changed to "--without-caca”, then reran the port upgrade command. That did the trick! Thanks for the workaround. -- Brian D. Weitzner Postdoctoral Fellow Chemical & Biomolecular Engineering Johns Hopkins University Baltimore, Maryland 21218 http://graylab.jhu.edu <http://graylab.jhu.edu/> |
|
From: Mojca M. <moj...@gm...> - 2015-08-03 22:47:23
|
On Mon, Aug 3, 2015 at 8:07 PM, Ethan A Merritt wrote: > On Monday, 03 August, 2015 12:40:22 Brian Weitzner wrote: > >> Hello, >> >> I am trying to build gunplot on a Mac via macports and I get the following >> error: >> >> :info:build In file included from term.c:1194: >> :info:build In file included from ./term.h:254: >> :info:build ../term/caca.trm:2514:3: warning: implicit declaration of >> function 'process_event' is invalid in C99 [-Wimplicit-function-declaration] >> :info:build process_event(GE_replot, 0, 0, 0, 0, 0); >> :info:build ^ >> :info:build ../term/caca.trm:2514:17: error: use of undeclared identifier >> 'GE_replot' >> :info:build process_event(GE_replot, 0, 0, 0, 0, 0); >> :info:build ^ >> > >> Has this issue been encountered and/or resolved by anyone else? Any help >> or information is appreciated. > > I don't know why it is failing, but the simplest fix is to > disable the caca terminal > > ./configure --without-caca > > It's a "just-for-fun" option that you don't need for anything serious. > I am somewhat surprised that your machine even has libcaca installed > to begin with. For every configuration option (or every terminal for that matter) a packager has to decide whether to: - disable some functionality for everyone - enable that functionality for everyone - give user an option to enable/disable it (but introducing extra confusion to users trying to navigate through a huge number of options) The general guidelines in MacPorts is to try to keep things simple and to try to provide a reasonably minimal set of options for users to choose from. Because libcaca was so lightweight, enabling it by default for everyone seemed like the most natural choice. But I admit that I didn't really test it. It is indeed a tiny bit annoying. I see that it launches X11 despite explicitly disabling it in libcaca (the "gl" driver does that), it misbehaves (mouse buttons are not mapped properly and the scrolling is completely wrong) and it doesn't exit in a clean way. With ncurses it works somewhat better (without mouse support). Brian cannot "easily" disable libcaca without interfering with package management system (which he did). I can either disable it for everyone or introduce a configuration option to enable/disable the terminal on request if that is a general consensus. In any case I would prefer a proper patch in caca.trm, but even more importantly: we need to figure out why mouse support in interactive terminals is disabled on Brian's machine. That fact alone will seriously limit usability of interactive terminals for him. Brian, did you happen to disable wxWidgets and X11 (along with Qt which is already off by default) or was there some other mysterious reason for disabling mouse support? Mojca |
|
From: Mojca M. <moj...@gm...> - 2015-08-04 08:17:55
Attachments:
gnuplot-mouse.diff
|
Dear developers,
Would it be possible to include the attached patch for detecting the
need of mouse support in caca.trm?
Of course one would also need to patch caca.trm itself, but I'm not
sure which portions exactly need an explicit
#ifdef USE_MOUSE
as some events might be triggered by the keyboard and I'm not familiar
enough with the code enough to be able to guarantee the correctness of
my workaround/solution.
Mojca
(PS: This just made me wonder about one thing: what exactly is the
point of "#ifdef USE_MOUSE" being used in terminals such as X11, QT
etc. [outside of TERM_TABLE_START that is] if there is actually no way
to turn the mouse support off? Not that anyone would really want to
turn it off, but ...)
|