Closed JohnCC330 closed 1 year ago
Hello, this is not an OTPClient issue. You need to install all the needed devel packages (you are currently missing the one for zbar).
Have a look at https://github.com/paolostivanin/OTPClient/blob/0da71785ad483c6607dfd95fce7d8014987f2c38/.circleci/config.yml#L18 for an example for Ubuntu.
Sorry, I should have mentioned I'm using Slackware - all .h headers are installed by default. I also compiled zbar myself, so these headers are there too. Thanks for the quick reply though!
Checking:
zbar_fourcc
function definition.$ pkg-config --cflags --libs zbar
returns -lzbar
So, I compiled again, with VERBOSE=1, and captured the compile command for qrcode-parser.c
:
(I split the output for readability)
Building C object CMakeFiles/OTPClient.dir/src/qrcode-parser.c.o
/usr/bin/cc
-DGETTEXT_PACKAGE=\"OTPClient\"
-I/usr/local/src/internet/opt/OTPClient-master/build
-I/usr/include/gtk-3.0
-I/usr/include/at-spi2-atk/2.0
-I/usr/include/at-spi-2.0
-I/usr/include/dbus-1.0
-I/usr/lib64/dbus-1.0/include
-I/usr/include/gio-unix-2.0
-I/usr/include/cairo
-I/usr/include/pango-1.0
-I/usr/include/harfbuzz
-I/usr/include/fribidi
-I/usr/include/atk-1.0
-I/usr/include/pixman-1
-I/usr/include/libxml2
-I/usr/include/freetype2
-I/usr/include/gdk-pixbuf-2.0
-I/usr/include/libpng16
-I/usr/include/libmount
-I/usr/include/blkid
-I/usr/include/glib-2.0
-I/usr/lib64/glib-2.0/include
-I/usr/include/uuid
-I/usr/include/libsecret-1
-Wall
-Wextra -O2 -Wformat=2 -Wmissing-format-attribute -fstack-protector-strong -Wundef
-Wmissing-format-attribute -fdiagnostics-color=always -Wstrict-prototypes -Wunreachable-code
-Wchar-subscripts -Wwrite-strings -Wpointer-arith -Wbad-function-cast -Wcast-align
-Werror=format-security -Werror=implicit-function-declaration -Wno-sign-compare
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pie -fPIE -DBUILD_GUI -DBUILD_CLI -std=gnu11
-MD -MT CMakeFiles/OTPClient.dir/src/qrcode-parser.c.o -MF
CMakeFiles/OTPClient.dir/src/qrcode-parser.c.o.d -o CMakeFiles/OTPClient.dir/src/qrcode-parser.c.o
-c /usr/local/src/internet/opt/OTPClient-master/src/qrcode-parser.c
Note that the command is not including zbar
? I'm not familiar with CMAKE (I was hoping to skip
CMAKE to Meson...
What version of zbar are you using?
It has to be something misconfigured on your system, because the package is compiling fine on Ubuntu, Fedora, Debian, openSUSE, Archlinux and NixOS.
I'm not familiar with Slackware, so I can't really help here, sorry.
The biggest difference is that libraries are installed in /usr/lib64
. As usual, include files are in /usr/include
. I find it very strange that, though pkg-config
reports correctly the include file's name, it does not appear in the compile command line.
Older versions of the CMAKE scripts had troubles working with library path /usr/lib64
.
zbar is version 0.23.90.
Also on most other distros libs are installed under /usr/lib64
, so that's not the issue here :thinking:
What GCC and cmake version are you using?
cmake version 3.25.1 gcc (GCC) 12.2.0
Hi Paolo!
As this was probably a linking problem, I asked the same question on Stackoverflow, and they suggested that there might be an older version of zbar.h
lying around. Sure enough, in /usr/local/include
was a zbar.h
(from 2014!) - The actual library was not there, but the .h
was enough to throw the compiler off course.
Thanks!
There was just one confusion: When creating a new database, Gnome keyring prompted for a password - which had to be the user's password, not the database password...
On 'manual' compilation, I get the following:
This seems to be an internal (to otpclient) issue... If I can find the time, I'll try and find the problem.