Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.12.1: missing pcre2 dependency checking #247

Open
kloczek opened this issue Sep 25, 2022 · 9 comments
Open

3.12.1: missing pcre2 dependency checking #247

kloczek opened this issue Sep 25, 2022 · 9 comments

Comments

@kloczek
Copy link

kloczek commented Sep 25, 2022

cmake shows:

+ /usr/bin/cmake -B x86_64-redhat-linux-gnu -D BUILD_SHARED_LIBS=ON -D CMAKE_AR=/usr/bin/gcc-ar -D CMAKE_BUILD_TYPE=RelWithDebInfo -D CMAKE_C_FLAGS_RELEASE=-DNDEBUG -D CMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -D CMAKE_Fortran_FLAGS_RELEASE=-DNDEBUG -D CMAKE_INSTALL_PREFIX=/usr -D CMAKE_NM=/usr/bin/gcc-nm -D CMAKE_RANLIB=/usr/bin/gcc-ranlib -D CMAKE_VERBOSE_MAKEFILE=ON -D INCLUDE_INSTALL_DIR=/usr/include -D LIB_INSTALL_DIR=/usr/lib64 -D LIB_SUFFIX=64 -D SHARE_INSTALL_PREFIX=/usr/share -D SYSCONF_INSTALL_DIR=/etc -S .
-- The C compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.9.3")
cat: version: No such file or directory
-- Checking for modules 'gtk+-3.0>=3.22.0;dbus-1>=1.0;dbus-glib-1>=0.22'
--   Found gtk+-3.0, version 3.24.34
--   Found dbus-1, version 1.14.0
--   Found dbus-glib-1, version 0.112
-- Checking for module 'gmodule-export-2.0'
--   Found gmodule-export-2.0, version 2.74.0
-- Checking for module 'vte-2.91>=0.52'
--   Found vte-2.91, version 0.70.0
-- Configuring done
-- Generating done

and with that build fails on:

[tkloczko@pers-jacek x86_64-redhat-linux-gnu]$ make
/usr/bin/cmake -S/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1 -B/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/CMakeFiles /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make  -f CMakeFiles/manpages.dir/build.make CMakeFiles/manpages.dir/depend
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
cd /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1 /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1 /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/CMakeFiles/manpages.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make  -f CMakeFiles/manpages.dir/build.make CMakeFiles/manpages.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make[2]: Nothing to be done for 'CMakeFiles/manpages.dir/build'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
[  5%] Built target manpages
make  -f src/CMakeFiles/rtlib.dir/build.make src/CMakeFiles/rtlib.dir/depend
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
cd /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1 /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/src /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src/CMakeFiles/rtlib.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make  -f src/CMakeFiles/rtlib.dir/build.make src/CMakeFiles/rtlib.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make[2]: Nothing to be done for 'src/CMakeFiles/rtlib.dir/build'.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
[ 37%] Built target rtlib
make  -f src/CMakeFiles/roxterm.dir/build.make src/CMakeFiles/roxterm.dir/depend
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
cd /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1 /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/src /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src/CMakeFiles/roxterm.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
make  -f src/CMakeFiles/roxterm.dir/build.make src/CMakeFiles/roxterm.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu'
[ 40%] Building C object src/CMakeFiles/roxterm.dir/roxterm.c.o
cd /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src && /usr/bin/gcc  -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/atk-1.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/vte-2.91 -I/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/x86_64-redhat-linux-gnu/src -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -DNDEBUG -MD -MT src/CMakeFiles/roxterm.dir/roxterm.c.o -MF CMakeFiles/roxterm.dir/roxterm.c.o.d -o CMakeFiles/roxterm.dir/roxterm.c.o -c /home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/src/roxterm.c
/home/tkloczko/rpmbuild/BUILD/roxterm-3.12.1/src/roxterm.c:39:10: fatal error: pcre2.h: No such file or directory
   39 | #include <pcre2.h>
      |          ^~~~~~~~~
compilation terminated.

All becuse there is no pcre2 dependecies checkig.

@kloczek
Copy link
Author

kloczek commented Sep 25, 2022

BTW currently glib uses pcre2 as rexep beckend so instead usig pcre2 probably better woud be use glib regex API
https://docs.gtk.org/glib/struct.Regex.html

@realh
Copy link
Owner

realh commented Sep 25, 2022

I used pcre2 because vte started using that instead of glib's regex API. On Debian derivatives, libvte2.91-dev depends on libpcre2-dev, and the latter's header is at the top-level of /usr/include, so it was OK to leave it out of the pkg-config calls, but I do remember there was a problem with Ubuntu for a while, because the vte package was built with pcre disabled for some silly reason.

If you just install the libpcre2 devel package, does that fix the build? If not, please let me know, and include information about the version of vte you're using and whether it appears to have any dependencies on pcre2. It looks like you're building an RPM package, so if simply installing the right package does work, you would want to add it to the package build dependencies.

@realh
Copy link
Owner

realh commented Sep 25, 2022

The CMake output also shows that you're missing the "version" file, which can happen if you're using an archive which was created without it (perhaps you downloaded a zip generated by github?). You should create one by running printf "3.12.1" > version in the top-level of the source directory. The file should not have a trailing newline.

@kloczek
Copy link
Author

kloczek commented Sep 25, 2022

I used pcre2 because vte started using that instead of glib's regex API.

It was at the time when gkib has been using pcre. Now things changed so it is opportunity to adjust that.

@realh
Copy link
Owner

realh commented Sep 25, 2022

I need to use whatever vte's using, and I don't think they've migrated back to glib yet.

@kloczek
Copy link
Author

kloczek commented Sep 25, 2022

If you just install the libpcre2 devel package, does that fix the build? If

Of course it builds only because in my case pcte2-8 has in Cflags: -I$(includedir).
So in other worsdss it works by coincodence and not because it will be working in all possible cases.

@kloczek
Copy link
Author

kloczek commented Sep 25, 2022

I need to use whatever vte's using, and I don't think they've migrated back to glib yet.

If you will look on vte issue tickets you wiil be able to find my ticket with RFE to switch to glib regex.
At the time it was refuised because pcre was used. Not things changed and I'll try to repeat thar requests .. only because it is about KISS principle compliance.

@realh
Copy link
Owner

realh commented Sep 25, 2022

I've added a pkg-config check for libpcre2-8 and committed it, but I don't want to make a new release just for this. But I can do that if it would help you to build a package that you're going to distribute.

@kloczek
Copy link
Author

kloczek commented Sep 25, 2022

LGTM.

I would suggest add patch like below as well to leave packagers decision which one files should be included in packages (as those firls will be left in source tree it will be possible to do that).

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,9 +31,6 @@
 install(DIRECTORY Config
     DESTINATION ${CMAKE_INSTALL_DATADIR}/roxterm)

-install(DIRECTORY docs/
-    DESTINATION ${CMAKE_INSTALL_DOCDIR})
-
 find_program(XSLTPROC xsltproc)
 if (NOT "${XSLTPROC}" EQUAL "XSLTPROC-NOTFOUND")
     set(XSLTPROC_OPTIONS --novalid --param man.charmap.use.subset 0

And I would really consider to use glib rexep API as well.
Feel free to close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants