Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60975 closed defect (fixed)

qt5-qtwebkit: fatal error: 'CSSGrammar.hpp' file not found

Reported by: thetrial (alabay) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc: michaelld (Michael Dickens)
Port: qt511-qtwebkit

Description

I tried it on two machines and I tried trace-mode. It didn’t build. I am on El Capitan, thus depend on qt5. What usually works when building stuff that would e.g. ask for qt6.

Warning: Qt dependency is not the latest version but may be the latest supported on your OS

Here is the tail of the log:

:info:build 392 warnings generated.
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1/Source/WebCore'
:info:build make[1]: *** [sub-Target-pri-make_first-ordered] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1/Source/WebCore'
:info:build make: *** [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1" && /usr/bin/make -j4 -w 
:info:build Exit code: 2
:error:build Failed to build qt511-qtwebkit: command execution failed
:debug:build Error code: CHILDSTATUS 5069 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/main.log for details.

Attachments (2)

qt5-qtwebkit-main.log.zip (3.6 MB) - added by Schamschula (Marius Schamschula) 4 years ago.
main.log.zip (3.6 MB) - added by thetrial (alabay) 4 years ago.
qt511-qtwebkit @5.9.1 Try to rebuild

Change History (37)

comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula added

comment:2 Changed 4 years ago by Schamschula (Marius Schamschula)

Cc: Schamschula removed

comment:3 Changed 4 years ago by Schamschula (Marius Schamschula)

Unfortunately, the error is not visible in the log tail. Please attach the full main.log.

Last edited 4 years ago by Schamschula (Marius Schamschula) (previous) (diff)

Changed 4 years ago by Schamschula (Marius Schamschula)

Attachment: qt5-qtwebkit-main.log.zip added

comment:4 Changed 4 years ago by Schamschula (Marius Schamschula)

Keywords: legacy-os elcapitan removed
Summary: qt511-qtwebkit @ 5.9.1_2.darwin_15.x86_64: Failed to build qt511-qtwebkit: command execution failedqt511-qtwebkit: fatal error: 'CSSGrammar.hpp' file not found

In my log the error is

:info:build generated/CSSGrammar.cpp:160:10: fatal error: 'CSSGrammar.hpp' file not found
:info:build #include "CSSGrammar.hpp"
:info:build          ^~~~~~~~~~~~~~~~
:info:build 44 warnings and 1 error generated.

comment:5 Changed 4 years ago by Schamschula (Marius Schamschula)

Summary: qt511-qtwebkit: fatal error: 'CSSGrammar.hpp' file not foundqt5-qtwebkit: fatal error: 'CSSGrammar.hpp' file not found

comment:6 Changed 4 years ago by thetrial (alabay)

Yes, here it is exactly the same.

:info:build generated/CSSGrammar.cpp:160:10: fatal error: 'CSSGrammar.hpp' file not found
:info:build #include "CSSGrammar.hpp"
:info:build          ^
:info:build 44 warnings and 1 error generated.

comment:7 Changed 4 years ago by kencu (Ken)

clang became much more strict regarding include files a year ago or so --- system includes must be < and > and local includes must be " and ".

That is probably a good place to start looking for this error.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:8 Changed 4 years ago by Schamschula (Marius Schamschula)

Unfortunately, that's not the problem. The file CSSGrammar.hpp does not exist - its is either not created, or deleted before it is needed.

This is likely an issue due to the recent update to bison 3.7.x, see: #60978

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

comment:9 Changed 4 years ago by thetrial (alabay)

My recent attempts led to success. There was no error. Is this an implicite solution?

comment:10 Changed 4 years ago by michaelld (Michael Dickens)

The file CSSGrammar.hpp is being created, but there are all sorts of parsing issues with the input script. Could be as noted a bison issue here, or some other port that was recently updated.

comment:11 Changed 4 years ago by michaelld (Michael Dickens)

Cc: michaelld added

comment:12 Changed 4 years ago by Michael Klein <michael.klein@…>

Resolution: fixed
Status: assignedclosed

In 00f0c96071a475d968272f70aa4945f111e330b1/macports-ports (master):

qt5-qtwebkit: work around bison related build failure

Closes: #60975

Changed 4 years ago by thetrial (alabay)

Attachment: main.log.zip added

qt511-qtwebkit @5.9.1 Try to rebuild

comment:13 Changed 4 years ago by thetrial (alabay)

Strange thing … I have to return to this ticket due it’s exactly the same again. qt511-qtwebkit had to be rebuild again, and it gave the same error.

comment:14 Changed 4 years ago by thetrial (alabay)

Resolution: fixed
Status: closedreopened

comment:15 Changed 4 years ago by mf2k (Frank Schima)

Please attach the latest full main.log.

comment:16 Changed 4 years ago by thetrial (alabay)

I had attached it before I wrote the comment. »qt511-qtwebkit @5.9.1 Try to rebuild«.

Last edited 4 years ago by thetrial (alabay) (previous) (diff)

comment:17 Changed 4 years ago by thetrial (alabay)

Any chance to fix that? Maybe just with an addition of that missing file?! My Macports installation hangs now for quite a long time. It seems El Capitan starts to smell funny for Macports. Or vice versa.

comment:18 Changed 4 years ago by kencu (Ken)

We haven't really sorted out why you're having trouble here, but the current version of qt511-qtwebit is sitting on the buildbot for your OS, waiting for you to download and install it:

$ port info qt511-qtwebkit
qt511-qtwebkit @5.9.1_2 (aqua)

<http://packages.macports.org/qt511-qtwebkit/qt511-qtwebkit-5.9.1_2.darwin_15.x86_64.tbz2>

is that not somehow working for you?

Re: El Cap and MacPorts -- all other package managers have (AFAIK) abandoned you, so MacPorts is your "Knight in Shining Armour", here to save you from oblivion...

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:19 Changed 4 years ago by thetrial (alabay)

Hm, how do I install that?

I put that in /opt/local/var/macports/software/qt511-qtwebkit and tried a sudo port -b install qt511-qtwebkit, but it did not work.

--->  Computing dependencies for qt511-qtwebkit
--->  Cleaning qt511-qtwebkit
--->  Scanning binaries for linking errors
--->  Found 1 broken file, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: qt511-qtwebkit @5.9.1
Continue? [Y/n]:
--->  Computing dependencies for qt511-qtwebkit
--->  Cleaning qt511-qtwebkit
--->  Scanning binaries for linking errors
--->  Found 1 broken file, matching files to ports
Error: rev-upgrade failed: Port qt511-qtwebkit still broken after reinstalling -- can't rebuild due to binary-only mode

Am I doing something wrong?

I don’t use other package managers. I guess I had tried out fink before macports … back in times of 10.4 oder 10.5 maybe. Isn’t Macports even still having support for much older OSs? I’m very (!) happy with MP, but the last months sommething always happpens. I’m not quite shure, but probably it’s more or less (always) connected with that Qt implementation.

Indeed, MP IS my »Knight in Bright Shining Armour« :-) Thanks for that.

comment:20 Changed 4 years ago by thetrial (alabay)

Today I found out something very interesting: When I compare those two archive files qt511-qtwebkit-5.9.1_2.darwin_15.x86_64.tbz2 – the one you provided and I downloaded (20210201) and the one that is available here in Macports’ system in its directory (20200813) – they are absolutely identical.

comment:21 Changed 4 years ago by thetrial (alabay)

Any chance to find a solution after seven months? Still, this is the a broken port, always calling for a rebuild.

comment:22 Changed 4 years ago by kencu (Ken)

It's apparently something bonkers on your system.

By now I would have just completely uninstalled (see the guide entry on this) and then reinstalled MacPorts. It'll take only a few minutes.

Life is too short to pound your head against the wall like this.

comment:23 Changed 4 years ago by thetrial (alabay)

Well … I dared.

Completely deinstalled Macports and all ports, everything. Then redone all from scratch. I simply let install all my requested ports, their dependencies come automatically.

The first try looked good. Even qt511-qtwebkit slipped through. But then, after all … this came:

--->  Updating database of binaries
--->  Updating database of C++ stdlib usage
--->  Scanning binaries for linking errors
--->  Found 7 broken files, matching files to ports
--->  Found 2 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 qt511-qtwebkit @5.9.1
 webkit2-gtk @2.28.2+minibrowser+x11
Continue? [Y/n]:

Well … yes.

And … I’m stuck. Exactly the same error.

:info:build generated/CSSGrammar.cpp:160:10: fatal error: 'CSSGrammar.hpp' file not found
:info:build #include "CSSGrammar.hpp"

So, no. It seems it was not my system or installation. Either there is a bug, or it is something in the combination.

Again, I have El Capitan (on two different machines, both have this problem!).

And this is my »stuff« I install:

alpine autoconf autoconf213 automake boost ccache cmake coreutils curl dcfldd e2fsprogs git graphene graphviz-gui mc mpstats ncurses openjdk11 openssh owncloud-client pkgconfig port_cutleaves qprint screen sqlitebrowser sudo wget wine-devel winetricks wireshark3 zsh

And KeePassXC … but this doesn’t install at all anymore.

So, I guess this whole experiment (not only some minutes) was in vain. What shall I do now?!

I guess, first of all, I have to completely restore /opt from backup :-(

comment:24 Changed 4 years ago by kencu (Ken)

can you see what exactly is making rev-upgrade fail? (use the "-v" option).

comment:25 Changed 4 years ago by thetrial (alabay)

It starts with …

sudo port -v rev-upgrade
Password:
--->  Scanning binaries for linking errors
Could not open /opt/local/lib/libjpeg.9.dylib: Error opening or reading file (referenced from /opt/local/libexec/qt5/lib/QtWebKit.framework/Versions/5/QtWebKit)
--->  Found 1 broken file, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: qt511-qtwebkit @5.9.1
Continue? [Y/n]:
--->  Computing dependencies for qt511-qtwebkit.
--->  Cleaning qt511-qtwebkit
--->  Removing work directory for qt511-qtwebkit
--->  Scanning binaries for linking errors
Could not open /opt/local/lib/libjpeg.9.dylib: Error opening or reading file (referenced from /opt/local/libexec/qt5/lib/QtWebKit.framework/Versions/5/QtWebKit)
--->  Found 1 broken file, matching files to ports
--->  Found 1 broken port, determining rebuild order
--->  Rebuilding in order
     qt511-qtwebkit @5.9.1

… builds quite a long time and ends with …

392 warnings generated.
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1/Source/WebCore'
make[1]: *** [sub-Target-pri-make_first-ordered] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1/Source/WebCore'
make: *** [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/work/qtwebkit-opensource-src-5.9.1" && /usr/bin/make -j4 -w
Exit code: 2
Error: Failed to build qt511-qtwebkit: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_aqua_qt511/qt511-qtwebkit/main.log for details.
Error: rev-upgrade failed: Error rebuilding qt511-qtwebkit
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

If I then look into the logfile there is one fatal error:

:info:build generated/CSSGrammar.cpp:160:10: fatal error: 'CSSGrammar.hpp' file not found
:info:build #include "CSSGrammar.hpp"
:info:build          ^
:info:build 44 warnings and 1 error generated.
:info:build make[2]: *** [.obj/generated/CSSGrammar.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....

So I guess the main logfile I had provided as comment 13 should show all.

comment:26 Changed 4 years ago by kencu (Ken)

Ah, thanks.

/opt/local/lib/libjpeg.9.dylib

We realized recently a couple of the qt5 ports had linked against libjpeg without us knowing about it, and broke with the recent change to turbo-jpeg. Some of them have been revbumped, but not qt511-qtwebkit I guess.

So that is why the buldbot version of qt511-qtwebkit is broken and needs to be rebuilt.

Obviously needs a rev-bump, but someone should build it first and make sure it builds OK before they do that.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:27 Changed 4 years ago by kencu (Ken)

I'm running a rebuild now on my El Cap hardware to see what happens.

comment:28 Changed 4 years ago by thetrial (alabay)

I’m curious. So you think it’s this libjpeg thing instead the missing hpp? Or is this file missing due to this jpeg issue? I’m glad you still have the necessary hardware.

comment:29 Changed 4 years ago by kencu (Ken)

So I have the same error you have, fatal error: 'CSSGrammar.hpp' file not found when rebuilding it.

qt511-qtwebkit was broken by the upgrade to turbo-jpeg, and now we find out that something has changed in the past few years, and it can't be rebuilt with the present setup. No doubt it is the same bison issue that was fixed in qt5-qtwebkit by <https://github.com/macports/macports-ports/commit/00f0c96071a475d968272f70aa4945f111e330b1>.

Last edited 4 years ago by kencu (Ken) (previous) (diff)

comment:30 Changed 4 years ago by ken-cunningham-webuse

Resolution: fixed
Status: reopenedclosed

In 476b4fb7b1feedb0e581fc5aa391671321a6fe97/macports-ports (master):

qt511-qtwebkit: revbump and fix against new bison

needs a revbump due to jpegturbo change
needs a fix due to bison update

closes: #60975

comment:31 Changed 4 years ago by thetrial (alabay)

What does this mean now? What is a revbumb?

comment:32 Changed 4 years ago by kencu (Ken)

It's fixed for you on 10.11. just wait a bit until the new index makes it way out to you, and then you should find it rebuilds for you now.

I don't really use this at all, but I can see how much you wanted it, and it I knew how to fix it, so I took care of it for you.

comment:33 Changed 4 years ago by thetrial (alabay)

Thanks a lot! ;-) It’s not a requested thing but implicitly necessary I guess. Though I don’t know where it belongs to … wine? Or wine-tricks? I guess somewhere there. And wine is a little must.

Now I hope KeePassXC gets fixed … I guess the owncloud-client above 2.6 won’t get adapted to Qt5 anymore … then my ports’ updates work again.

comment:34 Changed 4 years ago by thetrial (alabay)

Hm, maybe I’m just too fast. But how long is a bit? ;-) Until today it still gives me the error.

comment:35 Changed 4 years ago by thetrial (alabay)

Now. It ran through! Thank you very much.

Note: See TracTickets for help on using tickets.