How to include libraries into my first ever flatpak?
Aug 21, 2023
L
liz134
#1
I use Flatpak 1.14.4 on Ubuntu 22.03. I have been using like end-user flatpaks for years. But now I would like to build one of the flatpak myself.
I would like to build probably quite simple flatpak using PasswordSafe password manager.
Home page: XXXwww.pwsafe.orgXXX
Source code: XXXhttps://github.com/pwsafe/pwsafe/archive/refs/tags/1.17.0.tar.gzXXX
I am complete newbee building flatpaks! I have been reading tons of internet sources related to flatpak and now I am try and miss…
In extracted directory there is Misc subdir. From this subdir execute: ./setup-linux-dev-env.sh
This command installs dependency libraries.
More or less compile program’s source code, by following instructions in: README.LINUX.DEVELOPERS.md file (just copy/paste few commands).
BUILDING FLATPAK
Now I would like to create my first flatpak (if ignoring the ones on several internet sources).
I opened terminal and changed directory to ~/Downloads, created file make.sh with 700 file permissions and then run the file: “./make.sh” Content of file is:
Output of ./make.sh is missing dependency library: “libqrencode-dev(el) not installed”.
Details
========================================================================
Building module pwsafe in /home/igor/Downloads/.flatpak-builder/build/pwsafe-2
========================================================================
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Interprocedural optimization (LTO/LTCG) is enabled.
-- Found UnixCommands: /usr/bin/bash
-- Performing Test HARDEN_COMPILE_WFORMAT
-- Performing Test HARDEN_COMPILE_WFORMAT - Success
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY - Success
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY - Failed
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION - Success
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG - Success
-- Performing Test HARDEN_LINK_Z_RELRO
-- Performing Test HARDEN_LINK_Z_RELRO - Success
-- Performing Test HARDEN_LINK_Z_NOW
-- Performing Test HARDEN_LINK_Z_NOW - Success
-- Looking for qrencode.h
-- Looking for qrencode.h - not found
CMake Error at CMakeLists.txt:85 (message):
libqrencode-dev(el) not installed: install or select NO_QR
Compiler is throwing out an error, because dependency library is missing. When compiling into binary file those packages are installed as “apt install libqrencode-dev” (from Misc/setup-linux-dev-env.sh).
Like I understand, somehow in my Manifest file I need to include dependency libraries.
For example I have found required library source code for my error “libqrencode-dev”. It is available from: https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz
Library home page: hhttps://fukuchi.org/works/qrencode/index.html
Do I need to download and compile every dependent library main program is requiring or can I include it from some other source like deb package or something?
I am stuck here… any idea is greatly appreciated.
I know there are Dependencies and Manifests in documentation, but… pretty steep learning curve.
I would also advice, to not build the flatpak in your download folder, as there are probably many more files in there, that could confuse you/make stuff hard to find. At least move it into a sub folder of downloads. (or better something else)
And if you know your way around git, feel free to push it somewhere, makes it much easier to jump in and help you.
L
liz134
#3
@razzeee, your link really helped. I have added “libqrencode” to my manifest file following your advice and also added “wxwidgets” the same way, because of new error message I got.
Now I am stuck at the error:
fatal: unable to access XXXhttps://github.com/google/googletest.git/:XXX Could not resolve host: XXXgithub.comXXX
Note: I have added XXX, because forum is complaining I can post those web links.
Details
Downloading sources
Starting build of com.github.pwsafe.pwsafe
Cache hit for libqrencode, skipping build
Cache hit for wxwidgets, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module pwsafe in /home/igor/flatpak/.flatpak-builder/build/pwsafe-12
========================================================================
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Interprocedural optimization (LTO/LTCG) is enabled.
-- Found UnixCommands: /usr/bin/bash
-- Performing Test HARDEN_COMPILE_WFORMAT
-- Performing Test HARDEN_COMPILE_WFORMAT - Success
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY - Success
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY - Failed
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION - Success
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG - Success
-- Performing Test HARDEN_LINK_Z_RELRO
-- Performing Test HARDEN_LINK_Z_RELRO - Success
-- Performing Test HARDEN_LINK_Z_NOW
-- Performing Test HARDEN_LINK_Z_NOW - Success
-- Looking for qrencode.h
-- Looking for qrencode.h - found
-- Found wxWidgets: -L/app/lib;-pthread;;;-lwx_gtk3u_aui-3.2;-lwx_baseu-3.2;-lwx_gtk3u_core-3.2;-lwx_gtk3u_html-3.2;-lwx_baseu_net-3.2 (found version "3.2.2")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.9")
-- Found Magic: /usr/lib/x86_64-linux-gnu/libmagic.so
-- Looking for uuid/uuid.h
-- Looking for uuid/uuid.h - found
-- Looking for yk_init in ykpers-1
-- Looking for yk_init in ykpers-1 - not found
-- Yubikey support disabled
CMake Warning at CMakeLists.txt:147 (message):
XML enabled but XercesC_INCLUDE_DIR unset - using default
CMake Warning at CMakeLists.txt:151 (message):
XML enabled but XercesC_LIBRARY unset - using default
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /run/build/pwsafe/googletest-download
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
-- Had to git clone more than once: 3 times.
CMake Error at googletest-download/googletest-prefix/tmp/googletest-gitclone.cmake:39 (message):
Failed to clone repository: 'https://github.com/google/googletest.git'
make[2]: *** [CMakeFiles/googletest.dir/build.make:99: googletest-prefix/src/googletest-stamp/googletest-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/googletest.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at CMakeLists.txt:240 (add_subdirectory):
add_subdirectory given source "/run/build/pwsafe/googletest-src" which is
not an existing directory.
-- Found Git: /usr/bin/git (found version "2.41.0")
-- Updating version file (1.17.0 local).
-- Configuring incomplete, errors occurred!
Error: module pwsafe: Child process exited with code 1
The module pwsafe is trying to download googletest during the build stage, of which it cant as internet access is disabled then.
So you will either need to add a module similar to how you did for wxwidgets and libqrencode, or somehow disable testing during the build, to avoid needing googletest in the first place.
If you go the path off adding googletest to the manifest, since its just a build dependency you should remember to clean it up afterwards.
L
liz134
#5
@HighKingofMelons, thanks. According to your advice I have now added googletest to my manifest:
Emptying app dir 'build-dir'
Downloading sources
Starting build of com.github.pwsafe.pwsafe
Cache hit for libqrencode, skipping build
Cache hit for wxwidgets, skipping build
Cache hit for gtest, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module pwsafe in /opt/flatpak/.flatpak-builder/build/pwsafe-5
========================================================================
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Interprocedural optimization (LTO/LTCG) is enabled.
-- Found UnixCommands: /usr/bin/bash
-- Performing Test HARDEN_COMPILE_WFORMAT
-- Performing Test HARDEN_COMPILE_WFORMAT - Success
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY - Success
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY - Failed
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION - Success
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG - Success
-- Performing Test HARDEN_LINK_Z_RELRO
-- Performing Test HARDEN_LINK_Z_RELRO - Success
-- Performing Test HARDEN_LINK_Z_NOW
-- Performing Test HARDEN_LINK_Z_NOW - Success
-- Looking for qrencode.h
-- Looking for qrencode.h - found
-- Found wxWidgets: -L/app/lib;-pthread;;;-lwx_gtk3u_aui-3.2;-lwx_baseu-3.2;-lwx_gtk3u_core-3.2;-lwx_gtk3u_html-3.2;-lwx_baseu_net-3.2 (found version "3.2.2")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.9")
-- Found Magic: /usr/lib/x86_64-linux-gnu/libmagic.so
-- Looking for uuid/uuid.h
-- Looking for uuid/uuid.h - found
-- Looking for yk_init in ykpers-1
-- Looking for yk_init in ykpers-1 - not found
-- Yubikey support disabled
CMake Warning at CMakeLists.txt:147 (message):
XML enabled but XercesC_INCLUDE_DIR unset - using default
CMake Warning at CMakeLists.txt:151 (message):
XML enabled but XercesC_LIBRARY unset - using default
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /run/build/pwsafe/googletest-download
[ 11%] Creating directories for 'googletest'
[ 22%] Performing download step (git clone) for 'googletest'
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
Cloning into 'googletest-src'...
fatal: unable to access 'https://github.com/google/googletest.git/': Could not resolve host: github.com
-- Had to git clone more than once: 3 times.
CMake Error at googletest-download/googletest-prefix/tmp/googletest-gitclone.cmake:39 (message):
Failed to clone repository: 'https://github.com/google/googletest.git'
make[2]: *** [CMakeFiles/googletest.dir/build.make:99: googletest-prefix/src/googletest-stamp/googletest-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/googletest.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
CMake Error at CMakeLists.txt:240 (add_subdirectory):
add_subdirectory given source "/run/build/pwsafe/googletest-src" which is
not an existing directory.
-- Found Git: /usr/bin/git (found version "2.41.0")
-- Updating version file (1.17.0 local).
-- Configuring incomplete, errors occurred!
Error: module pwsafe: Child process exited with code 1
L
liz134
#6
@HighKingofMelons I have figured out how to disable Google Test. Option can be made to cmake compiter like:
config-opts:
- -DNO_GTEST=ON
Now build gone pass google-test, but now I am falling into new issue, like another library missing. I have search github flatpak, but can’t find “libos” library in any other flatpak manifest. Error I get:
[ 23%] Linking CXX static library libos.a
[ 23%] Built target os
make: *** [Makefile:166: all] Error 2
Downloading sources
Starting build of com.github.pwsafe.pwsafe
Cache hit for libqrencode, skipping build
Cache hit for wxwidgets, skipping build
Cache miss, checking out last cache hit
========================================================================
Building module pwsafe in /opt/flatpak/.flatpak-builder/build/pwsafe-15
========================================================================
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Interprocedural optimization (LTO/LTCG) is enabled.
-- Found UnixCommands: /usr/bin/bash
-- Performing Test HARDEN_COMPILE_WFORMAT
-- Performing Test HARDEN_COMPILE_WFORMAT - Success
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WFORMAT_SECURITY - Success
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY
-- Performing Test HARDEN_COMPILE_WERROR_FORMAT_SECURITY - Failed
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION
-- Performing Test HARDEN_COMPILE_STACK_CLASH_PROTECTION - Success
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_COMPILE_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK
-- Performing Test HARDEN_LINK_SANITIZE_SAFE_STACK - Failed
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG
-- Performing Test HARDEN_COMPILE_STACK_PROTECTOR_STRONG - Success
-- Performing Test HARDEN_LINK_Z_RELRO
-- Performing Test HARDEN_LINK_Z_RELRO - Success
-- Performing Test HARDEN_LINK_Z_NOW
-- Performing Test HARDEN_LINK_Z_NOW - Success
-- Looking for qrencode.h
-- Looking for qrencode.h - found
-- Found wxWidgets: -L/app/lib;-pthread;;;-lwx_gtk3u_aui-3.2;-lwx_baseu-3.2;-lwx_gtk3u_core-3.2;-lwx_gtk3u_html-3.2;-lwx_baseu_net-3.2 (found version "3.2.2")
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "3.0.9")
-- Found Magic: /usr/lib/x86_64-linux-gnu/libmagic.so
-- Looking for uuid/uuid.h
-- Looking for uuid/uuid.h - found
-- Yubikey support disabled
CMake Warning at CMakeLists.txt:147 (message):
XML enabled but XercesC_INCLUDE_DIR unset - using default
CMake Warning at CMakeLists.txt:151 (message):
XML enabled but XercesC_LIBRARY unset - using default
-- Found Git: /usr/bin/git (found version "2.41.0")
-- Updating version file (1.17.0 local).
-- Configuring done (2.0s)
-- Generating done (0.0s)
-- Build files have been written to: /run/build/pwsafe
[ 0%] Generating core_st.cpp, core_st.h
[ 1%] Generating helpEN.zip
[ 2%] Generating version.h, version.h.nosuchfile
[ 3%] Generating helpRU.zip
[ 3%] Generating mos/da/LC_MESSAGES/pwsafe.mo
[ 3%] Building CXX object src/os/CMakeFiles/os.dir/unix/KeySend.cpp.o
[ 4%] Generating pwsafe.1.gz
mv: '/run/build/pwsafe/src/core/core_st.cpp' and '/run/build/pwsafe/src/core/core_st.cpp' are the same file
make[2]: *** [src/core/CMakeFiles/core.dir/build.make:75: src/core/core_st.cpp] Error 1
make[2]: *** Deleting file 'src/core/core_st.cpp'
make[1]: *** [CMakeFiles/Makefile2:327: src/core/CMakeFiles/core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 4%] Generating helpDE.zip
-- Updating version file (1.17.0 local).
[ 5%] Building CXX object src/os/CMakeFiles/os.dir/unix/UUID.cpp.o
[ 5%] Built target manpage
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_da.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_da.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_da.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_da.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_da.po:8: warning: header field 'Language' still has the initial default value
[ 6%] Generating mos/de/LC_MESSAGES/pwsafe.mo
[ 6%] Built target pws_version_intermediate
[ 6%] Generating mos/es/LC_MESSAGES/pwsafe.mo
[ 6%] Generating helpES.zip
[ 7%] Generating helpFR.zip
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_es.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_es.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_es.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_es.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_es.po:8: warning: header field 'Language' still has the initial default value
[ 7%] Generating helpPL.zip
[ 7%] Generating helpZH.zip
[ 8%] Generating mos/fr/LC_MESSAGES/pwsafe.mo
[ 9%] Building CXX object src/os/CMakeFiles/os.dir/unix/cleanup.cpp.o
[ 9%] Building CXX object src/os/CMakeFiles/os.dir/unix/debug.cpp.o
[ 10%] Building CXX object src/os/CMakeFiles/os.dir/unix/dir.cpp.o
[ 10%] Building CXX object src/os/CMakeFiles/os.dir/unix/env.cpp.o
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_fr.po:7: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_fr.po:7: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_fr.po:7: warning: header field 'Language' still has the initial default value
[ 10%] Generating mos/hu/LC_MESSAGES/pwsafe.mo
[ 10%] Built target helpfiles
[ 11%] Generating mos/it/LC_MESSAGES/pwsafe.mo
[ 11%] Generating mos/ko/LC_MESSAGES/pwsafe.mo
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_it.po:7: warning: header field 'Language-Team' still has the initial default value
[ 12%] Generating mos/nl/LC_MESSAGES/pwsafe.mo
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_ko.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_ko.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_ko.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_ko.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_ko.po:8: warning: header field 'Language' still has the initial default value
[ 12%] Generating mos/pl/LC_MESSAGES/pwsafe.mo
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_nl.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_nl.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_nl.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_nl.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_nl.po:8: warning: header field 'Language' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_pl.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_pl.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_pl.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_pl.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_pl.po:8: warning: header field 'Language' still has the initial default value
[ 13%] Generating mos/ru/LC_MESSAGES/pwsafe.mo
[ 13%] Generating mos/sv/LC_MESSAGES/pwsafe.mo
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_sv.po:7: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_sv.po:7: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_sv.po:7: warning: header field 'Language' still has the initial default value
[ 14%] Generating mos/zh/LC_MESSAGES/pwsafe.mo
[ 15%] Building CXX object src/os/CMakeFiles/os.dir/unix/file.cpp.o
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_zh.po:8: warning: header field 'Project-Id-Version' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_zh.po:8: warning: header field 'PO-Revision-Date' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_zh.po:8: warning: header field 'Last-Translator' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_zh.po:8: warning: header field 'Language-Team' still has the initial default value
/run/build/pwsafe/src/ui/wxWidgets/I18N/pos/pwsafe_zh.po:8: warning: header field 'Language' still has the initial default value
[ 15%] Built target mos
[ 15%] Building CXX object src/os/CMakeFiles/os.dir/unix/keyname.cpp.o
[ 17%] Building CXX object src/os/CMakeFiles/os.dir/unix/logit.cpp.o
[ 17%] Building CXX object src/os/CMakeFiles/os.dir/unix/media.cpp.o
[ 18%] Building CXX object src/os/CMakeFiles/os.dir/unix/mem.cpp.o
[ 19%] Building CXX object src/os/CMakeFiles/os.dir/unix/pws_str.cpp.o
[ 19%] Building CXX object src/os/CMakeFiles/os.dir/unix/pws_time.cpp.o
[ 19%] Building CXX object src/os/CMakeFiles/os.dir/unix/rand.cpp.o
[ 20%] Building CXX object src/os/CMakeFiles/os.dir/unix/registry.cpp.o
[ 20%] Building CXX object src/os/CMakeFiles/os.dir/unix/run.cpp.o
[ 21%] Building CXX object src/os/CMakeFiles/os.dir/unix/sleep.cpp.o
[ 21%] Building CXX object src/os/CMakeFiles/os.dir/unix/unicode2keysym.cpp.o
[ 22%] Building CXX object src/os/CMakeFiles/os.dir/unix/utf8conv.cpp.o
[ 22%] Building CXX object src/os/CMakeFiles/os.dir/unix/xsendstring.cpp.o
/run/build/pwsafe/src/os/unix/utf8conv.cpp: In constructor ‘Startup::Startup()’:
/run/build/pwsafe/src/os/unix/utf8conv.cpp:36:19: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
36 | (void) write(STDERR_FILENO, wrnmess, sizeof(wrnmess)/sizeof(*wrnmess)-1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/pwsafe/src/os/unix/utf8conv.cpp:42:19: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
42 | (void) write(STDERR_FILENO, errmess, sizeof(errmess)/sizeof(*errmess)-1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/pwsafe/src/os/unix/utf8conv.cpp:47:19: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
47 | (void) write(STDERR_FILENO, errmess, sizeof(errmess)/sizeof(*errmess)-1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 23%] Linking CXX static library libos.a
[ 23%] Built target os
make: *** [Makefile:166: all] Error 2
Error: module pwsafe: Child process exited with code 2
L
liz134
#7
Maybe there is something else a problem…
Error from previous post when building is:
/run/build/pwsafe/src/os/unix/utf8conv.cpp:36:19: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
36 | (void) write(STDERR_FILENO, wrnmess, sizeof(wrnmess)/sizeof(*wrnmess)-1);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/run/build/pwsafe/src/os/unix
I have now opened file /run/build/pwsafe/src/os/unix/utf8conv.cpp and checked the 36 line:
33 // Couldn't get environment-specified locale, warn user
34 // and punt to default "C"
35 char wrnmess[] = "Couldn't load locale, falling back to default\n";
36 (void) write(STDERR_FILENO, wrnmess, sizeof(wrnmess)/sizeof(*wrnmess)-1);
37 sl = setlocale(LC_ALL, gl);
Above code looks like a environment variable “language” problem. I remember when compiling PasswordSafe in “distrobox/podman” using fedora:38 I was required to install language package: sudo dnf install langpacks-en.noarch
Maybe I need to add something additionally related to language. Any idea?
I additionally added permission to access Documents home directory.
Uninstalled flatpak, installed it again (to get permissions), and run flatpak.
FLATPAK STARTED THE APPLICATION SUCCESSFULLY!!!
I tested application:
– From GUI I clicked on “New” to create new password manager database.
– Selected Documents location to store new database.
– Right click on blank space bellow icons and Add Entry.
– Typed in data: Title, Username, Password, Confirm fields and OK button
– Closed down application.
– Started it again and saved entry appears. Double click on entry. Paste to text editor.
– Password is successfully pasted.
– IT LOOKS AT LEAST BASIC FUNCTIONALITY WORKS FINE!!!
Few thinks not working:
When I start application and press Alt+Tab there is incorrect program’s icon. Icon appears as “setting” icon. How to add icon to flatpak?
I can successfully start flatpak application from terminal. But I am so used to launch applications by pressing “Super” key and type in like a letter or two of program name and application icon should be displayed and just pressing Enter key should launch application.
Related to previous point. When icon is displayed right mouse on icon should work so “Add to favorites” could be selected and icon added to the Linux launcher bar.
When I start application and click on “New” button file chooser dialog is displayed with default path pointing to: /home/"user"/.var/app/com.github.pwsafe.pwsafe/config/pwsafe This is probably location user do not want to save there password database. Is it possible to set default to /home/"user"/Documents
I added rename-desktop-file and rename-icon to manifest file and now when pressing Super key and type in passwordsave (or less letters) program’s icon is displayed and I can launch the program. I can also add the icon to Linux lauchpad and also Alt+Tab show the icon. Excellent problem solved.
Now I have uninstalled flatpack application and removed the $HOME/.var/app/com.github.pwsafe.pwsafe directory. Rebuild application and now error appeared: Could not initialize help subsystem. Help will not be available. with
checkbox Don’t show this warning again. I remember I have checked this box before and confirmed with OK button and application GUI starts successfully. On another start it does not ask this question anymore, but inside application menu selection Help | Help does not work, no error is displayed.
I have found exactly the same error message on project bug tracker and it looks like related to environment variable: XXXhttps://github.com/pwsafe/pwsafe/issues/720
Few weeks ago I installed password safe inside distrobox/podman on Fedora Silverblue and I remember I was required to install sudo dnf --assumeyes install langpacks-en.noarch
Now I have searched for this “package” or “library” in github, but can’t figure it out if this is environment variable problem or some missing package/library.
By searching for the error message in the project, and backtracking through the code, I managed to trace the issue back to this function:
The helpfiles in the flatpak build get installed in /app/share/passwordsafe/help/, rather than in /user/share. This means we’ll need to set PWS_HELPDIR to our location and it should work.
L
liz134
#18
@HighKingofMelons, inside finish-args I have added - --env=PWS_HELPDIR=/app/share/passwordsafe/help/ and now flatpak application starts without error referencing to help. When I select menu option Help | Help and help is correctly displayed. Thanks a lot. Problem solved.
Reading documentation I have seen at the end of process “cleansing” processes is recommended, to make flatpak package as small as possible.
I checked the size of installed flatpak: flatpak run --command=sh --devel and it outputs 49 MB. It is relatively small program.
I entered into inside of flaptak package with: flatpak run --command=sh --devel com.github.pwsafe.pwsafe and list all of directories and files in it with ls / -R > out.txt
List of all directories and files. Click on bellow link and click on “Download”. Untar the file and there is out.txt file in it with whole dir/file structure.
Do some cleansing of unnecessary files (“cleanup-command” section in manifest file). It reduced flatpak package size from 49,2 MB to 44,6 MB which is 5 MB. Better something then nothing.
I have added YubiKey support that I have temporally disabled before, to simplify the process.
I am very satisfied with the current state of PasswordSafe flatpak package. I did some basic testing and so far no issue at all.
Future next few days plan?
a) I need to perform in deep testing of flatpak package. I will probably need few days.
b) Then I will most probably need some help to go through publishing package in Flathub. Any hint at pointing me to some good source?