Opened 5 years ago

Closed 15 months ago

#57508 closed defect (fixed)

gnuplot @5.2.5_0 +aquaterm+luaterm+pangocairo+qt5+wxwidgets+x11: cannot find wx/wxprec.h

Reported by: hugo-ribeiro (Hugo Ribeiro) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: dbevans (David B. Evans), cooljeanius (Eric Gallager)
Port: gnuplot, wxWidgets-3.0, wxWidgets-common

Description

I cannot upgrade from gnuplot @5.2.4_0 to @5.2.5_0. It seems the problem is linked to wxwidget.

The following message appears during configuration

checking for wx-config... /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config

          Warning: No config found to match: /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/bin/wx-config --release
                   in /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/config
          If you require this configuration, please install the desired
          library build.  If this is part of an automated configuration
          test and no other errors occur, you may safely ignore it.
          You may use wx-config --list to see all configs available in
          the default prefix.

Wx-config is a symlink to

wx-config -> /opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/config/osx_cocoa-unicode-3.0

However, I am not sure if this is related to the error that ultimately leads to the compilation failing

In file included from wxterminal/wxt_gui.cpp:97:
wxterminal/wxt_gui.h:75:10: fatal error: 'wx/wxprec.h' file not found
#include <wx/wxprec.h>

The header wxprec.h is present in my system at the following location

/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/include/wx-3.0/wx/wxprec.h

I've attached the log file.

Attachments (1)

main.log (181.0 KB) - added by hugo-ribeiro (Hugo Ribeiro) 5 years ago.

Download all attachments as: .zip

Change History (10)

Changed 5 years ago by hugo-ribeiro (Hugo Ribeiro)

Attachment: main.log added

comment:1 Changed 5 years ago by mojca (Mojca Miklavec)

Cc: mojca removed
Owner: set to mojca
Status: newassigned
Version: 2.5.4

I kept struggling with exact same problem, being in complete dark / entirely clueless about what was going on.

But then I uninstalled wxWidgets-3.0 and installed it again, and everything worked fine ever since, so I assumed it must have been something wrong on my machine.

This is definitely unrelated to gnuplot in any way (I had the exact same issue with wxsvg), it has something to do with wxWidgets, but I have absolutely no clue what. It seems as if wx-config was defunct in some way. Maybe as a consequence of installingand uninstalling, activating and deactivating, selecting and unselecting some ports?

I'm still clueless, but maybe you could backup your wxWidgets-3.0 and wxWidgets-common from /opt/local/var/software (something like that, I'm not behind a mac at the moment), force uninstall them, install them again and then compare for the differences? (Or maybe just force deactivate them and activate them again to start with?)

comment:2 Changed 5 years ago by hugo-ribeiro (Hugo Ribeiro)

I've uninstalled wxWidgets-3.0 and wxWidgets-common and asked macports to upgrade gnuplot. Since both wxWidgets packages are dependencies of gnuplot they got re-installed and gnuplot upgraded flawlessly.

I guess it's going to be difficult to pinpoint the reason why wxWidgets-3.0 and/or wxWidgets-common was broken in the first place, but reinstalling them solves the problem indeed.

comment:3 in reply to:  2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to hugo-ribeiro:

I guess it's going to be difficult to pinpoint the reason why wxWidgets-3.0 and/or wxWidgets-common was broken in the first place, but reinstalling them solves the problem indeed.

Looks like the only difference between the "bad" and "good" wxWidgets-3.0 is:

--- wx-bad/wxWidgets-3.0/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/config/osx_cocoa-unicode-3.0	2018-07-16 12:24:04.000000000 -0500
+++ wx-good/wxWidgets-3.0/opt/local/Library/Frameworks/wxWidgets.framework/Versions/wxWidgets/3.0/lib/wx/config/osx_cocoa-unicode-3.0	2018-11-14 22:05:47.000000000 -0600
@@ -89,7 +89,7 @@
 
 
 # Contentious tools determined by configure.
-EGREP="/opt/local/bin/grep -E"
+EGREP="/opt/local/bin/ggrep -E"
 
 
 # For the people who know what they want, or think they do:

In other words, I had the grep port installed when I built wxWidgets-3.0 back in July, and the path to its grep got baked into the installed files and that gets used by wx-config. (Actually, wx-config is a symlink to the above osx_cocoa-unicode-3.0 file.)

Since then, the grep port was changed and it no longer installs /opt/local/bin/grep; it now installs /opt/local/bin/ggrep. So now wx-config doesn't work anymore, because the grep it is trying to use no longer exists.

wxWidgets-3.0 should be changed so that it deterministically uses /usr/bin/grep (if that's sufficient) or /opt/local/bin/ggrep (if that's necessary, along with adding a dependency on port:grep), and in either case, the revision should be increased to fix any existing installations.

The same change should be made to any other affected ports. I think it will affect these ports:

  • wxgtk-2.8
  • wxgtk-3.0
  • wxPython-3.0
  • wxWidgets-2.8
  • wxWidgets-3.0-cxx11
  • wxWidgets-3.0-libcxx
  • wxWidgets-3.2

Only users who build from source and who had the grep port installed at the time would have been affected. Those getting a binary from our buildbot wouldn't have been affected since the grep port wasn't installed when the buildbot built the port.

Last edited 5 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:4 Changed 5 years ago by mojca (Mojca Miklavec)

Thanks a lot for the useful analysis. I'm pretty sure we don't need ggrep, else the port from our buildbot wouldn't be functional. I'll try to find an elegant way to replace the grep command.

comment:5 Changed 5 years ago by mojca (Mojca Miklavec)

Does anyone have a chance to double-check whether

configure.env       GREP='/usr/bin/grep' \
                    EGREP='/usr/bin/grep -E'

works ok on 10.5?

comment:6 Changed 5 years ago by mojca (Mojca Miklavec)

Cc: dbevans added

comment:7 Changed 4 years ago by vallon (Justin)

I found the same trouble with EGREP in https://trac.macports.org/ticket/51950.

I build from source. EGREP was /opt/local/bin/ggrep in wx-config, but that broke when ggrep was uninstalled (I uninstall leaves periodically). After rebuilding wxWidgets-3.0, EGREP is now "/usr/bin/grep -E".

From a packaging point of view, wxWidgets-3.0 should not use anything that it does not declare as a dependency, or else it might work at configure/build time but then break at run time. If the configure step is detecting ggrep, the package should declare a dependency on it; else, do not check for its existence and accidentally use it.

edit: MacOS Catalina 10.15.4

Last edited 4 years ago by vallon (Justin) (previous) (diff)

comment:8 Changed 3 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:9 Changed 15 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In 733709c1df5e4d7171633d6f8aecbd44359e79cf/macports-ports (master):

wxWidgets-*: do not bake in MacPorts ggrep

Fixes #57508

Note: See TracTickets for help on using tickets.