25 дек. 2014 г. 23:28 пользователь "Adam Wolk" <adam.w...@koparo.com> написал:
>
> Hi ports@
>
> I'm CC'ing the KDE porting team as they are marked as the MAINTAINER of
> the qt5 port in the
> OpenBSD ports tree.
>
> I'm working on a port of the Otter Browser (http://otter-browser.org/)
> and have hit a bunch of issues that
> do not seem to be upstream (otter-browser) related.
>
> Details:
>  - OpenBSD i386 running snapshots (from 23 Dec 2014)
>  - otter-browser commit e6a48fd71c121f1d486dabcf21e5b48809497c3a from
>  Thu Dec 25 16:28:02 2014 +0100
>  - ldd output at the end of the email
>
> I will provide as many details as necessary - just ask :)
>
> 0. CMake fails to find qt5
>
> qt5 is not found unless I prefix it with:
>
> CMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake/
>
> $ cmake ../
> -- The C compiler identification is GNU 4.2.1
> -- The CXX compiler identification is GNU 4.2.1
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> CMake Error at CMakeLists.txt:56 (find_package):
>   By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project
>   has
>   asked CMake to find a package configuration file provided by
>   "Qt5Core", but
>   CMake did not find one.
>
>   Could not find a package configuration file provided by "Qt5Core" with
>   any
>   of the following names:
>
>     Qt5CoreConfig.cmake
>     qt5core-config.cmake
>
>   Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
>   "Qt5Core_DIR" to a directory containing one of the above files.  If
>   "Qt5Core" provides a separate development package or SDK, be sure it
>   has
>   been installed.
>
>
> -- Configuring incomplete, errors occurred!
> See also
> "/home/mulander/otter-head/otter/build/CMakeFiles/CMakeOutput.log".

That's "normal" - I.e., things are the way Qt developers set them.
They provide Qt5 CMake package config files, containing a lot of
hardcoded relative paths there. So it's not easy to move .cmake files
under some common prefix, outside of /usr/local/lib/qt5.

N.B.: If you'd use x11/qt5 module, you'll get all the CMake setup for
free, see /usr/ports/x11/qt5/qt5.port.mk (documentation is on the
way).

> 1. Otter browser uses CMake to find libraries - packaging forces me to
> install all qt5 libs
>
> Otter Browser only uses:
>
> find_package(Qt5Core REQUIRED)
> find_package(Qt5Network REQUIRED)
> find_package(Qt5PrintSupport REQUIRED)
> find_package(Qt5Script REQUIRED)
> find_package(Qt5Sql REQUIRED)
> find_package(Qt5Widgets REQUIRED)
> find_package(Qt5WebKit REQUIRED)
> find_package(Qt5WebKitWidgets REQUIRED)
>
> Yet the build fails unless I have the following installed:
>
> $ pkg_info -Q qt5
> qt5-5.3.2p0 (installed)
> qt5-examples-5.3.2
> qt5-mysql-5.3.2 (installed)
> qt5-postgresql-5.3.2 (installed)
> qt5-sqlite2-5.3.2 (installed)
> qt5-tds-5.3.2 (installed)
>
> In summary - CMake prevents the build unless I have tds, mysql &
> postgresql qt5 installed even though otter-browser only uses
> qt5-sqlite2.

Yes, known problem. CMake config file for Qt5Sql talks about all
backends always. To be redone after fixing other urgent stuff.

BTW, can't the Otter use the SQLite3 backend instead of SQLite2? The
former is bundled with Qt5 itself because SQLite3 is part of base
system nowadays.

> 2. gcc warnings after compilation
> Linking CXX executable otter-browser
> /usr/local/lib/qt5/libQt5Script.so.0.0: warning: random() may return
> deterministic values, is that what you want?
> /usr/local/lib/qt5/libQt5WebKit.so.0.0: warning: strcpy() is almost
> always misused, please use strlcpy()
> /usr/local/lib/qt5/libQt5Core.so.0.0: warning: rand() may return
> deterministic values, is that what you want?
> /usr/local/lib/qt5/libQt5Script.so.0.0: warning: sprintf() is often
> misused, please use snprintf()
> /usr/X11R6/lib/libX11.so.16.0: warning: strcat() is almost always
> misused, please use strlcat()
> /usr/local/lib/libglib-2.0.so.4200.0: warning: stpcpy() is dangerous; do
> not use it
> /usr/local/lib/libglib-2.0.so.4200.0: warning: vsprintf() is often
> misused, please use vsnprintf()

That's "normal"... Well, except strcpy() in Qt5WebKit - strange, I
thought I removed them all. I'll check again, thanks for reporting.
The sprintf() worths looking into as well.

(other points to be answered in a separate mail)

--
Vadim Zhukov

Reply via email to