Package Details: codevis-db-git r654.7cd6ba2-1

Git Clone URL: https://aur.archlinux.org/codevis-db-git.git (read-only, click to copy)
Package Base: codevis-db-git
Description: an analysis and visualization tool designed to assist in code maintenance for C++ codebases
Upstream URL: https://invent.kde.org/sdk/codevis
Licenses: Apache
Conflicts: codevis-db
Provides: codevis-db
Submitter: silverhikari
Maintainer: silverhikari
Last Packager: silverhikari
Votes: 0
Popularity: 0.000000
First Submitted: 2023-07-16 11:12 (UTC)
Last Updated: 2024-05-28 00:28 (UTC)

Latest Comments

Winterreise commented on 2024-05-27 00:59 (UTC)

BTW, I also met the test fails. Maybe wait for a while a smart choice.

The fail test:

The following tests FAILED:
          3 - test_lvtcgn_app_adapter (SEGFAULT)

Winterreise commented on 2024-05-27 00:34 (UTC) (edited on 2024-05-27 00:44 (UTC) by Winterreise)

@Eidokan Thanks for quick reply. I can confirmed that soci is installed, but it is built with shared library instead the required static library. Obviously, I install soci from a different repo archlinuxcn instead of AUR, so it is the problem I think. The right version should be 4.0.3-1 instead of 4.0.3.r0.g438e3549-5. After install the correct version, it successfully builds:

❯ pacman -Qi soci
Name            : soci
Version         : 4.0.3.r0.g438e3549-5
Description     : Database access library for C++
Architecture    : x86_64
URL             : http://soci.sf.net
Licenses        : custom:boost
Groups          : None
Provides        : None
Depends On      : postgresql-libs  sqlite3  unixodbc  boost-libs  mariadb-libs
Optional Deps   : instantclient-basic: support for oracle databases
                  libmysqlclient: support for mysql databases
                  postgresql-libs: support for postgresql databases [installed]
                  sqlite3: support for sqlite databases [installed]
                  unixodbc: support for ODBC databases [installed]
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 2.36 MiB
Packager        : lilac (on behalf of winstonwu91) <winstonwu91@gmail.com>
Build Date      : Sun Sep 3 04:29:02 2023
Install Date    : Sun May 26 23:49:10 2024
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

❯ pacman -Ql soci
soci /usr/
soci /usr/include/
soci /usr/include/soci/
soci /usr/include/soci/backend-loader.h
soci /usr/include/soci/bind-values.h
soci /usr/include/soci/blob-exchange.h
soci /usr/include/soci/blob.h
soci /usr/include/soci/boost-fusion.h
soci /usr/include/soci/boost-gregorian-date.h
soci /usr/include/soci/boost-optional.h
soci /usr/include/soci/boost-tuple.h
soci /usr/include/soci/callbacks.h
soci /usr/include/soci/column-info.h
soci /usr/include/soci/connection-parameters.h
soci /usr/include/soci/connection-pool.h
soci /usr/include/soci/empty/
soci /usr/include/soci/empty/soci-empty.h
soci /usr/include/soci/error.h
soci /usr/include/soci/exchange-traits.h
soci /usr/include/soci/into-type.h
soci /usr/include/soci/into.h
soci /usr/include/soci/logger.h
soci /usr/include/soci/mysql/
soci /usr/include/soci/mysql/soci-mysql.h
soci /usr/include/soci/noreturn.h
soci /usr/include/soci/odbc/
soci /usr/include/soci/odbc/soci-odbc.h
soci /usr/include/soci/once-temp-type.h
soci /usr/include/soci/postgresql/
soci /usr/include/soci/postgresql/soci-postgresql.h
soci /usr/include/soci/prepare-temp-type.h
soci /usr/include/soci/procedure.h
soci /usr/include/soci/query_transformation.h
soci /usr/include/soci/ref-counted-prepare-info.h
soci /usr/include/soci/ref-counted-statement.h
soci /usr/include/soci/row-exchange.h
soci /usr/include/soci/row.h
soci /usr/include/soci/rowid-exchange.h
soci /usr/include/soci/rowid.h
soci /usr/include/soci/rowset.h
soci /usr/include/soci/session.h
soci /usr/include/soci/soci-backend.h
soci /usr/include/soci/soci-config.h
soci /usr/include/soci/soci-platform.h
soci /usr/include/soci/soci-simple.h
soci /usr/include/soci/soci.h
soci /usr/include/soci/sqlite3/
soci /usr/include/soci/sqlite3/soci-sqlite3.h
soci /usr/include/soci/statement.h
soci /usr/include/soci/transaction.h
soci /usr/include/soci/type-conversion-traits.h
soci /usr/include/soci/type-conversion.h
soci /usr/include/soci/type-holder.h
soci /usr/include/soci/type-ptr.h
soci /usr/include/soci/type-wrappers.h
soci /usr/include/soci/unsigned-types.h
soci /usr/include/soci/use-type.h
soci /usr/include/soci/use.h
soci /usr/include/soci/values-exchange.h
soci /usr/include/soci/values.h
soci /usr/include/soci/version.h
soci /usr/lib/
soci /usr/lib/cmake/
soci /usr/lib/cmake/SOCI/
soci /usr/lib/cmake/SOCI/SOCIConfig.cmake
soci /usr/lib/cmake/SOCI/SOCIConfigVersion.cmake
soci /usr/lib/cmake/SOCI/SOCITargets-noconfig.cmake
soci /usr/lib/cmake/SOCI/SOCITargets.cmake
soci /usr/lib/libsoci_core.so
soci /usr/lib/libsoci_core.so.4.0
soci /usr/lib/libsoci_core.so.4.0.3
soci /usr/lib/libsoci_empty.so
soci /usr/lib/libsoci_empty.so.4.0
soci /usr/lib/libsoci_empty.so.4.0.3
soci /usr/lib/libsoci_mysql.so
soci /usr/lib/libsoci_mysql.so.4.0
soci /usr/lib/libsoci_mysql.so.4.0.3
soci /usr/lib/libsoci_odbc.so
soci /usr/lib/libsoci_odbc.so.4.0
soci /usr/lib/libsoci_odbc.so.4.0.3
soci /usr/lib/libsoci_postgresql.so
soci /usr/lib/libsoci_postgresql.so.4.0
soci /usr/lib/libsoci_postgresql.so.4.0.3
soci /usr/lib/libsoci_sqlite3.so
soci /usr/lib/libsoci_sqlite3.so.4.0
soci /usr/lib/libsoci_sqlite3.so.4.0.3
soci /usr/share/
soci /usr/share/licenses/
soci /usr/share/licenses/soci/
soci /usr/share/licenses/soci/LICENSE

Eidokan commented on 2024-05-26 17:59 (UTC)

@Winterreise That's weird. It does build for me without issues. One of the test (test_lvtcgn_app_adapter) segfaults though. As I only noticed that the day before yesterday, I was going to wait for a while and see if that gets fixed upstream. The missing file "/usr/lib/libsoci_core.a" from your log does exist on my system and is owned by the "soci" package from the AUR. Is that package installed correctly on your system according to pacman? If so does the file list of that package look suspicious?

Winterreise commented on 2024-05-26 15:57 (UTC)

Now will cause build error:

CMake Error at /usr/lib/cmake/SOCI/SOCITargets.cmake:126 (message):
  The imported target "SOCI::soci_core_static" references the file

     "/usr/lib/libsoci_core.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/lib/cmake/SOCI/SOCITargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/lib/cmake/SOCI/SOCIConfig.cmake:37 (include)
  thirdparty/CMakeLists.txt:16 (find_package)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'codevis-db-git-r259.f8ca242-1': 
error: packages failed to build: codevis-db-git-r259.f8ca242-1

Eidokan commented on 2023-10-21 14:11 (UTC)

Hi again,

I tinkered some more with this and managed to replace the bundled with the AUR packaged versions of both backward-cpp and SOCI. This way this package does not conflict with the soci package any more. It builds, checks and - during a quick test - runs fine for me.

prepare() {
    cd "$srcdir/${pkgname%-db-git}"

#   Make sure we don't use the bundled versions of Soci and backward-cpp
    rm -rf ./thirdparty/soci ./submodules/backward-cpp

#   Find packaged version of backward-cpp instead of including the bundled one
    patch ./desktopapp/CMakeLists.txt <<PATCH
4c4
< include_directories(\${CMAKE_CURRENT_SOURCE_DIR}/../submodules/backward-cpp)
---
> find_package(Backward REQUIRED)
PATCH

#   Find packaged version of SOCI instead of including the bundled one
    patch ./thirdparty/CMakeLists.txt <<PATCH
16c16
< add_subdirectory(soci \${SOCI_BINARY_DIR})
---
> find_package(SOCI REQUIRED)
PATCH

#   Fix names of SOCI libraries to match those of the AUR package
    sed -i -e 's/Soci::core/soci_core/' ./lvt{ldr,mdb}/CMakeLists.txt
    sed -i -e 's/Soci::sqlite3/soci_sqlite3/' ./lvt{ldr,mdb}/CMakeLists.txt
}

Obviously this adds dependencies to soci and backward-cpp, the later of which you already added. As backward-cpp is header-only, it can be in makedepends.
There also should be no need for a direct sqlite dependency anymore, as it is soci linking to it.
The other git repositories can be removed from source and checksums with or without that change, as they are not used anymore.

Thank you, again, for the package

Eidokan commented on 2023-10-18 17:28 (UTC)

Hi,

I was working on the dependency issues as well and noticed a couple more things.

  • Most notably upstream does not use git submodules any more. They still have a .gitmodules file and a submodules directory for some reason, but all necessary files are checked in directly, so the other repositories and the submodule setup in prepare can simply be dropped from this package. configuration-parser was completely replaced by kconfig5 and is gone for good.
  • bash, gcc-libs and glibc should probably not be a dependency as they are covered by base. I could have sworn there was a rule about that somewhere but I can't find it at the moment.
  • catch2 is a header-only unit test framework only needed to build the tests, so it should be in makedepends.
  • boost-libs is not needed as a dependency according to namcap.
  • the new dependencies feature a small typo: ktexteditor should be ktexteditor5.
  • Running the test suite also unveiled a dependency not currently listed, python-jinja-time. Without it I received a python related crash due to a module not being found. As the source of the test does not contain the string jinja, I assume that this is a dependency of codevis itself and not the test.

In addition to the dependency changes I came up with a check function that should work in containers and on headless systems. All tests are passing for me in a container with the changes from above.

check() {
        QT_QPA_PLATFORM='offscreen' ctest --test-dir build
}

The major remaining issue is that codevis ships a global soci installation that will likely conflict with others like the soci AUR package.

Thanks for making and maintaining this package!

hikmet1517 commented on 2023-10-14 19:14 (UTC)

kdoctools5 should be a build dependency.