Bug 245495 - www/qt5-webengine: build failure after devel/re2 upgrade
Summary: www/qt5-webengine: build failure after devel/re2 upgrade
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-09 21:53 UTC by Jack
Modified: 2020-07-31 10:51 UTC (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2020-04-09 21:53:37 UTC
After devel/re2 was upgraded, qt5-webengine fails to build

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=24906

Error:

--- sub-process-make_first ---
/usr/local/bin/ld: warning: libre2.so.0, needed by /usr/local/lib/qt5/libQt5WebEngineCore.so, not found (try using -rpath or -rpath-link)
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::RE2(re2::StringPiece const&)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::FilteredRE2::Compile(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::FindAndConsumeN(re2::StringPiece*, re2::RE2 const&, re2::RE2::Arg const* const*, int)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::~RE2()'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Arg::parse_int(char const*, unsigned long, void*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::FilteredRE2::AllMatches(re2::StringPiece const&, std::__1::vector<int, std::__1::allocator<int> > const&, std::__1::vector<int, std::__1::allocator<int> >*) const'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::RE2(char const*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::FullMatchN(re2::StringPiece const&, re2::RE2 const&, re2::RE2::Arg const* const*, int)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::PartialMatchN(re2::StringPiece const&, re2::RE2 const&, re2::RE2::Arg const* const*, int)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::RE2(re2::StringPiece const&, re2::RE2::Options const&)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::FilteredRE2::Add(re2::StringPiece const&, re2::RE2::Options const&, int*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Options::Options(re2::RE2::CannedOptions)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::FilteredRE2::FilteredRE2()'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::RE2(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Arg::parse_stringpiece(char const*, unsigned long, void*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::FilteredRE2::~FilteredRE2()'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Replace(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, re2::RE2 const&, re2::StringPiece const&)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::ConsumeN(re2::StringPiece*, re2::RE2 const&, re2::RE2::Arg const* const*, int)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Arg::parse_string(char const*, unsigned long, void*)'
/usr/local/bin/ld: /usr/local/lib/qt5/libQt5WebEngineCore.so: undefined reference to `re2::RE2::Arg::parse_ulong(char const*, unsigned long, void*)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [../../libexec/QtWebEngineProcess] Error code 1

make[4]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src/process
1 error

make[4]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src/process
*** [sub-process-make_first] Error code 2

make[3]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src
--- sub-webengine-make_first ---
A failure has been detected in another branch of the parallel make

make[5]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src/webengine
*** [sub-module-pro-make_first] Error code 2

make[4]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src/webengine
1 error

make[4]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src/webengine
*** [sub-webengine-make_first] Error code 2

make[3]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src
2 errors

make[3]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build/src
*** [sub-src-make_first] Error code 2

make[2]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build
1 error

make[2]: stopped in /usr/obj/usr/ports/www/qt5-webengine/work/.build
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/qt5-webengine
*** Error code 1
Comment 1 Tobias C. Berner freebsd_committer 2020-04-10 05:18:21 UTC
Moin moin

The issue here seems to be, that the building WebEngine picks up files from the already installed one. 

The easiest solution here is to follow UPDATING 20190613 and deinstall the pkg before upgrading (or use poudriere).



mfg Tobias
Comment 2 John Hein 2020-04-25 00:17:19 UTC
Assuming removal of the existing qt5-webengine fixed this for the OP, it seems to me there must be a way to tell these qt5 builds to look in WRKDIR before LOCALBASE so we don't repeatedly encounter this problem.

See also bug 245614, comment 9 for a similar instance of the same problem.
Comment 3 Jack 2020-04-25 01:45:52 UTC
Yes, removal before install fixed the issue.
Comment 4 John Hein 2020-07-30 21:03:10 UTC
(In reply to Tobias C. Berner from comment #1)
Updating qt5-webengine to 5.15.0 from 5.14.2 fails if already installed, too.  For example,

/usr/local/bin/ld: qquickwebengineview.cpp:(.text+0x4f25): undefined reference to `QtWebEngineCore::WebContentsAdapter::runFeatureRequestCallback(QUrl const&, QtWebEngineCore::ProfileAdapter::PermissionType, bool)'


The UPDATING notes that suggest removing the installed port are a bit old and refer to updating from 5.12.2.  Maybe a refreshed note in UPDATING is worthwhile.  Even better would be to have the build look in the build tree before /usr/local, but I do not have enough qt build understanding to figure out how to make that happen.
Comment 5 Tobias C. Berner freebsd_committer 2020-07-31 04:40:45 UTC
(In reply to John Hein from comment #4)
Moin moin 

I wrote this in the commit message:

    * People that use upgrading mechanisms with incomplete dependency handling
      (portmaster & Co) should make sure to manually remove the existing Qt
      packages to guarantee a safe upgrade. Keep in mind, that Qt does not like if
      you have an incomplete upgrade.



Arguably, I could also have put it into UPDATING :)


mfg Tobias
Comment 6 John Hein 2020-07-31 10:51:39 UTC
(In reply to Tobias C. Berner from comment #5)
Yeah, I guess I was suggesting it might merit an updated UPDATING note.

Could you explain what you mean by 'incomplete dependency handling'?