Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#62831 closed defect (fixed)

okular @4.14.3_9 +debug+docs: error: unknown type name 'okular'

Reported by: cooljeanius (Eric Gallager) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: NicosPavlov
Port: okular

Description

Now that bug #62105 has been fixed, I have been trying to install other KDE ports, and failed once I got to okular:

/opt/local/libexec/qt4/bin/moc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3 -I/opt/local/include/KDE4 -I/opt/local/include/KDE4/KDE -I/opt/local/include/KDE -I/opt/local/include -I/opt/local/libexec/qt4/include/QtXmlPatterns -I/opt/local/libexec/qt4/include/QtXml -I/opt/local/libexec/qt4/include/QtWebKit -I/opt/local/libexec/qt4/include/QtUiTools -I/opt/local/libexec/qt4/include/QtTest -I/opt/local/libexec/qt4/include/QtSvg -I/opt/local/libexec/qt4/include/QtSql -I/opt/local/libexec/qt4/include/QtScriptTools -I/opt/local/libexec/qt4/include/QtScript -I/opt/local/libexec/qt4/include/QtOpenGL -I/opt/local/libexec/qt4/include/QtNetwork -I/opt/local/libexec/qt4/include/QtMultimedia -I/opt/local/libexec/qt4/include/QtHelp -I/opt/local/libexec/qt4/include/QtDesigner -I/opt/local/libexec/qt4/include/QtDesigner -I/opt/local/libexec/qt4/include/QtDeclarative -I/opt/local/libexec/qt4/include/QtDBus -I/opt/local/libexec/qt4/include/Qt3Support -I/opt/local/libexec/qt4/include/QtGui -I/opt/local/libexec/qt4/include/QtCore -I/opt/local/libexec/qt4/include -I/opt/local/libexec/qt4/share/mkspecs/default -I/opt/local/libexec/qt4/include -I/opt/local/include/qimageblitz -F/Library/Frameworks -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=135 -DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -o /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/build/findbar.moc /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3/ui/findbar.h
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3/shell/shellutils.cpp:10:
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3/shell/shellutils.h:15:
In file included from /opt/local/include/KDE4/kurl.h:27:
In file included from /opt/local/libexec/qt4/include/QtCore/QVariant:1:
In file included from /opt/local/libexec/qt4/include/QtCore/qvariant.h:47:
In file included from /opt/local/libexec/qt4/include/QtCore/qlist.h:45:
In file included from /opt/local/libexec/qt4/include/QtCore/qiterator.h:50:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/new:90:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/exception:80:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/cstddef:37:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3/version:1:1: error: unknown type name 'okular'
okular v0.20.3
^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_kde_okular/okular/work/okular-4.14.3/version:1:10: error: expected ';' after top level declarator
okular v0.20.3
         ^

There were many other errors like this; I'll attach the log.

Attachments (3)

okularmain.log (869.6 KB) - added by cooljeanius (Eric Gallager) 3 years ago.
main.log for okular
patch-Portfile.diff (432 bytes) - added by NicosPavlov 3 years ago.
okular.log (1.2 MB) - added by jkeller2017 2 years ago.
okular log

Change History (18)

Changed 3 years ago by cooljeanius (Eric Gallager)

Attachment: okularmain.log added

main.log for okular

comment:1 Changed 3 years ago by NicosPavlov

If you look at the beginning of the log, there is a warning showing that there is an issue with the SDK install

7	:warn:main The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
8	:warn:main You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

That might very well be the issue considering the errors shown, and should be fixed first.

comment:2 in reply to:  1 ; Changed 3 years ago by cooljeanius (Eric Gallager)

Replying to NicosPavlov:

If you look at the beginning of the log, there is a warning showing that there is an issue with the SDK install

7	:warn:main The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
8	:warn:main You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

That might very well be the issue considering the errors shown, and should be fixed first.

That's a red herring; it says that even though I already have them installed:

$ sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Although, the fact that it says 11.2 when I've since updated to 11.3 makes me wonder if there's something left over from an old build; I'll clean and try again...

comment:3 in reply to:  2 Changed 3 years ago by cooljeanius (Eric Gallager)

Replying to cooljeanius:

Replying to NicosPavlov:

If you look at the beginning of the log, there is a warning showing that there is an issue with the SDK install

7	:warn:main The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
8	:warn:main You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

That might very well be the issue considering the errors shown, and should be fixed first.

That's a red herring; it says that even though I already have them installed:

$ sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Although, the fact that it says 11.2 when I've since updated to 11.3 makes me wonder if there's something left over from an old build; I'll clean and try again...

OK so yeah after cleaning and trying again it still fails with the same error, so I guess that wasn't it...

comment:4 Changed 3 years ago by NicosPavlov

Well, I am indeed not certain that this is the actual issue, but having tested it, I cannot reproduce the issue.

It is however saying it right there. There is a version installed but not necessarily the latest one, which should be installed through "Software Update".

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

You can also refer to the issue about reinstalling CLT ProblemHotlist#reinstall-clt in case the problem is related.

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

comment:5 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Nicos, the SDK warning is a red herring, as Eric said. This is a well known problem with MacPorts 2.6.4 which was released before we were aware of how Apple would number their OS versions and SDKs going forward. It's fixed in MacPorts 2.7.0 of which a beta is available now.

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

The real problem is that the user is using a C++20-capable compiler and is on a case-insensitive filesystem. See https://bugs.llvm.org/show_bug.cgi?id=42540. Rename the VERSION file to something else, like VERSION.txt, and update any references to that file, or ideally fix the build system so that the directory that contains the VERSION file is not among the -I paths.

comment:7 Changed 3 years ago by NicosPavlov

Ryan, thanks for the very detailed explanation. In that case, cooljeanius, would the following change fix the build? Based on my tests, the build goes fine, but as I am not experiencing the issue, I would like to confirm before I commit it.

Changed 3 years ago by NicosPavlov

Attachment: patch-Portfile.diff added

comment:8 in reply to:  7 Changed 3 years ago by cooljeanius (Eric Gallager)

Replying to NicosPavlov:

Ryan, thanks for the very detailed explanation. In that case, cooljeanius, would the following change fix the build? Based on my tests, the build goes fine, but as I am not experiencing the issue, I would like to confirm before I commit it.

Yeah that fixes it. It might be worth investigating and seeing which other ports need similar fixes, as I think I've seen other similar build failures... I'll have to try building some stuff again...

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

Ok, so after testing, I've found that adding that same snippet:

pre-configure {
    move ${worksrcpath}/VERSION ${worksrcpath}/VERSION.txt
}

...also fixes the builds of the following KDE ports for me:

  • kblackbox
  • kbruch

For kolourpaint it has to be done in either post-configure or pre-build instead, as the VERSION file is used in the configure step. For kdewebdev it's:

pre-configure {
    move ${worksrcpath}/kimagemapeditor/VERSION ${worksrcpath}/kimagemapeditor/VERSION.txt
    move ${worksrcpath}/kommander/VERSION ${worksrcpath}/kommander/VERSION.txt
}

...but then it runs into a different error; I'll have to open a separate bug for that...

comment:10 Changed 3 years ago by NicosPavlov

Thank you for the feedback, I'll commit those. I found an issue too in kdewebdev, but found how to fix it. I'll commit that shortly too.

comment:11 Changed 3 years ago by Nicolas Pavillon <pavillon.nicolas@…>

In 69369614250434f6f5a985696d4e87a035d00d15/macports-ports (master):

kblackbox, kbruch, kolourpaint, okular: fix issue with conflict about "VERSION" file with C++20 compilers (see #62831)

comment:12 Changed 3 years ago by Nicolas Pavillon <pavillon.nicolas@…>

In 452961ac1cab4ebc3dbdeff2910e8f9190396d67/macports-ports (master):

kwebdev: fix issue with conflict about "VERSION" file with C++20 compilers (see #62831)
Revert tidy header reference to fix build (see 0107b807d915 in 2015)

comment:13 Changed 3 years ago by NicosPavlov

Resolution: fixed
Status: newclosed

Closing the ticket at this point, assuming that the issues have been fixed. Please reopen if other ports have similar issues.

Changed 2 years ago by jkeller2017

Attachment: okular.log added

okular log

comment:14 Changed 2 years ago by jkeller2017

Hello, I couldn't install okular. I join the log file (see above okular.log). What is strange is that it seems the same problem as described by Eric when comparing our log files, but the fix issue of Nicos is already implemented in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/kde/okular/Portfile so I don't see what to do extra.

I am under OSX 12.1, SDK 12, and

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables --pkg-info=com.apple.pkg.CLTools_Base --pkg-info=com.apple.pkg.DeveloperToolsCLI --pkg-info=com.apple.pkg.DeveloperToolsCLILeo 2>/dev/null | sed -n 's/^version: //p' 

gives me

13.2.0.0.1.1638488800

Any idea ? Thanks.

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

comment:15 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

This ticket is closed; we'll discuss your issue in #64434.

Note: See TracTickets for help on using tickets.