Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by dkaip »

Hi. I am trying to compile last wxWidgets lib in Linux Mint 17.3
So with
git clone https://github.com/wxWidgets/wxWidgets.git
cd wxWidgets
git submodule update --init
i have all files.
With configure i have problem in -DNDEBUG configure: error: unrecognized option: `-DNDEBUG',
mkdir build-gtk
cd build-gtk
../configure --enable-unicode --enable-monolithic --enable-debug --with-gtk --disable-shared --with-opengl -DNDEBUG --prefix=$(pwd)
but anyway i delete it...
../configure --enable-unicode --enable-monolithic --enable-debug --with-gtk --disable-shared --with-opengl --prefix=$(pwd)
With make CXXFLAGS="-std=c++11" i must take the static lib just i have do with wxWidgets3.0.3 stable version.
But i take problem
../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:
Why is that?
Thank you.
Jim

*Just download wxWidgets 3.0.4 gz and with same procces i take fatal error...
../src/gtk/print.cpp:40:30: fatal error: gtk/gtkunixprint.h
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by DavidHart »

Hi,
With configure i have problem in -DNDEBUG configure: error: unrecognized option: `-DNDEBUG',
I think you are supposed to define NDEBUG when building your code, not when building wxWidgets.
--enable-monolithic ... --disable-shared
Do you really need those options? On Linux it is unusual, and unnecessary, to build monolithic wx libs.
With make CXXFLAGS="-std=c++11" i must take the static lib just i have do with wxWidgets3.0.3 stable version.
I have no idea what that sentence means.
../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:
You do not explain what gives that error. Is it when you build wxWidgets? Or when you build your own code?

I just built wxWidgets using your configure line. The first time, the 'configure' output included:
checking for LIBSECRET... configure: WARNING: libsecret not found, wxSecretStore won't be available
and the 'secretstore' sample was not created.

I did, as root: apt install libsecret-1-dev. (I am using debian stretch; the name might be different on Mint.) After that, configure was happy and the sample was created. I built wx and the secretstore successfully. The sample ran normally.

If none of the that solves your problem, you need to explain more about what you are doing that goes wrong, and what happens when you run 'secretstore'.

Regards,

David
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by dkaip »

Hello, i just remember it.
I found in some my papers when i compile lib.
Must give
make -j2

to compile.
Thank you.
Jim
*Making static libs no need to install wxwidgets lib in target pc.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by DavidHart »

Must give make -j2
That will just build faster; it will not help the problem that you seem to have.
*Making static libs no need to install wxwidgets lib in target pc.
Only if the target machine is very similar. It is unlikely that a wx program built on Mint will run on e.g. fedora. It is unlikely to run on every release even of Mint.
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by dkaip »

Thank you for this note. It is semantic, but how is that.
If i made a static lib in Mint, at compile time the binary must have all wxWidgets dependencies inside.
Why in fedora will don’t run, if i install all other dependencies except those of wxWidgets?
Dont are all Linux OS same in the way of running?

Finally BTW i just compile lib with ...
../configure --enable-unicode --enable-debug --with-gtk --disable-shared --with-opengl --enable-webview --prefix=$(pwd)
make -j2
All now runs ok.

Thank you.
Jim
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by DavidHart »

If i made a static lib in Mint, at compile time the binary must have all wxWidgets dependencies inside.
Not true. It will have the wx libs inside, but not their dependencies. For example you don't (and IIRC can't legally) statically-link against gtk+.
Why in fedora will don’t run, if i install all other dependencies
Because those dependencies (assuming they all exist) may have been built against, for example, a different version of glibc to the Mint one used for wxWidgets. I suggest you google for 'binary compatibility'.
All now runs ok.
Good :) . Maybe because this time you did not use --enable-monolithic...
dkaip
Super wx Problem Solver
Super wx Problem Solver
Posts: 334
Joined: Wed Jan 20, 2010 1:15 pm

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by dkaip »

Hi again.
Just download wxWidgets with ...
git clone --recurse-submodules https://github.com/wxWidgets/wxWidgets.git
Compile ok, but in program says
‘class wxGrid’ has no member named ‘GetRows’|
so i try minimal ...
a@a-desktop ~/wxWidgets/samples/minimal $ make
make: *** No targets specified and no makefile found. Stop.
So Chinese chars (Re: Characters looks like Chinese in zip) there are still...
See viewtopic.php?f=1&t=44054&p=185427#p185427
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Compiling error../src/unix/secretstore.cpp:33:30: fatal error: libsecret/secret.h:

Post by DavidHart »

a@a-desktop ~/wxWidgets/samples/minimal $ make
make: *** No targets specified and no makefile found. Stop.
You need to build 'minimal' (or 'grid' or...) in your build dir, not in your source dir. Try:

Code: Select all

cd ~/wxWidgets/build-gtk/samples/minimal
make
Post Reply