MantisBT - Doomseeker
View Issue Details
0003931Doomseeker[All Projects] Bugpublic2021-12-09 01:032021-12-09 02:42
WubTheCaptain 
 
normalminoralways
newopen 
amd64Debianbookworm/sid
1.3 
 
0003931: libwadseeker-dev 2.1: Using internal Wadseeker library
Not sure if I'm doing something wrong or if the libwadseeker-dev packaging has changed something. CMake can't find my system Wadseeker (anymore).
DRDTeam Debian packaging.
$ cmake /home/wub/.local/src/doomseeker/doomseeker
-- Using system zlib
-- Using system bzip2 library
-- Using internal Wadseeker library
-- Setting up plugin chocolatedoom. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/chocolate-doom
--     chocolatedoom provides translations
-- Setting up plugin odamex. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/odamex
--     odamex provides translations
-- Setting up plugin srb2. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/srb2
--     srb2 provides translations
-- Setting up plugin zandronum. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/zandronum
--     zandronum provides translations
-- Setting up plugin zandronumq. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/zandronumq
--     zandronumq provides translations
-- Setting up plugin turok2ex. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/turok2ex
--     turok2ex provides translations
-- 'INSTALL' will dump files to "/usr/local"
-- Configuring done
CMake Warning (dev) at src/wadseeker/CMakeLists.txt:210 (add_library):
  Policy CMP0115 is not set: Source file extensions must be explicit.  Run
  "cmake --help-policy CMP0115" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  File:

    /home/wub/.local/src/doomseeker/doomseeker/src/wadseeker/wadseekerversiondefs.h.in
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at src/core/CMakeLists.txt:173 (add_executable):
  Policy CMP0115 is not set: Source file extensions must be explicit.  Run
  "cmake --help-policy CMP0115" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  File:

    /home/wub/.local/src/doomseeker/doomseeker/src/core/versiondefs.h.in
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /tmp/doomseeker
Quote from CMakeLists.txt
if ( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
        message( STATUS "Using system Wadseeker library" )
else( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
        message( STATUS "Using internal Wadseeker library" )
        // ...
endif()

$ dpkg-query -L libwadseeker-dev
/usr
/usr/include
/usr/include/wadseeker
/usr/include/wadseeker/dptr.h
/usr/include/wadseeker/entities
/usr/include/wadseeker/entities/checksum.h
/usr/include/wadseeker/entities/hash.h
/usr/include/wadseeker/entities/modfile.h
/usr/include/wadseeker/entities/modset.h
/usr/include/wadseeker/entities/waddownloadinfo.h
/usr/include/wadseeker/freedoom.h
/usr/include/wadseeker/modinstall.h
/usr/include/wadseeker/protocols
/usr/include/wadseeker/protocols/networkreplytimeouter.h
/usr/include/wadseeker/wadseeker.h
/usr/include/wadseeker/wadseekerexportinfo.h
/usr/include/wadseeker/wadseekermessagetype.h
/usr/include/wadseeker/wadseekerversioninfo.h
/usr/include/wadseeker/zip
/usr/include/wadseeker/zip/unarchive.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libwadseeker.so

$ dpkg -l libwadseeker*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name             Version      Architecture Description
+++-================-============-============-=================================================================

ii  libwadseeker-dev 2.1          amd64        Header files for libwadseeker.
ii  libwadseeker2    2.1          amd64        Library for automatically locating and downloading mods 
for Doom.
No tags attached.
related to 0003280closed Zalewa Make building Doomseeker and libwadseeker as independent steps feasible 
Issue History
2021-12-09 01:03WubTheCaptainNew Issue
2021-12-09 01:04WubTheCaptainDescription Updatedbug_revision_view_page.php?rev_id=13401#r13401
2021-12-09 01:12WubTheCaptainNote Added: 0021858
2021-12-09 01:12WubTheCaptainAssigned To => Pol M
2021-12-09 01:12WubTheCaptainStatusnew => assigned
2021-12-09 01:15WubTheCaptainRelationship addedrelated to 0003280
2021-12-09 01:16WubTheCaptainNote Added: 0021859
2021-12-09 01:20WubTheCaptainNote Added: 0021860
2021-12-09 01:21WubTheCaptainNote Edited: 0021860bug_revision_view_page.php?bugnote_id=21860#r13403
2021-12-09 01:22WubTheCaptainProduct Version1.3.2 => 1.3
2021-12-09 01:43WubTheCaptainNote Added: 0021861
2021-12-09 01:43WubTheCaptainAssigned ToPol M =>
2021-12-09 01:43WubTheCaptainStatusassigned => new
2021-12-09 01:48WubTheCaptainNote Added: 0021862
2021-12-09 01:48WubTheCaptainNote Edited: 0021862bug_revision_view_page.php?rev_id=13409
2021-12-09 02:42WubTheCaptainNote Edited: 0021858bug_revision_view_page.php?bugnote_id=21858#r13419
2021-12-09 02:42WubTheCaptainNote Edited: 0021859bug_revision_view_page.php?bugnote_id=21859#r13421
2021-12-09 02:44WubTheCaptainNote View State: 0021862: private
2021-12-09 02:44WubTheCaptainNote Deleted: 0021862

Notes
(0021858)
WubTheCaptain   
2021-12-09 01:12   
(edited on: 2021-12-09 02:42)
After some git blame, found the culprit commit (identical conditions):
$ git show 4f219ba08 CMakeLists.txt
commit 4f219ba08744095a7f545ccc7cc76a3b01c15279
Author: Pol Marcet Sardà <polmarcetsarda@gmail.com>
Date:   Mon Jan 21 23:35:42 2019 +0100

    - Wadseeker and Doomseeker can now be built independently on non-Windows platforms. (0003280)
    -- Doomseeker can specify an external dependency to Wadseeker if FORCE_INTERNAL_WADSEEKER option 
is turned off (it's on by default).
    -- Wadseeker also now can be built from the source file generated by "makesourcepackages.sh"
    
- Now Wadseeker exports a Config.cmake (with other required files) to make it easy to import into other 
cmake projects.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9147b933..4e6635c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,7 @@ if(WIN32)
 else()
        option(FORCE_INTERNAL_ZLIB "Use internal zlib" OFF)
        option(FORCE_INTERNAL_BZIP2 "Use internal bzip2" OFF)
+       option(FORCE_INTERNAL_WADSEEKER "Use internal wadseeker" ON)

        include(${CMAKE_SOURCE_DIR}/cmake/Modules/Macros.cmake)

@@ -87,6 +88,9 @@ else()
        if(NOT FORCE_INTERNAL_BZIP2)
                find_package_BZip2()
        endif()
+       if(NOT FORCE_INTERNAL_WADSEEKER)
+               find_library_wadseeker()
+       endif()
 endif()

 if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
@@ -115,6 +119,16 @@ else( BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2 )
        set( BZIP2_LIBRARY bz2 )
 endif()

+if ( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
+       message( STATUS "Using system Wadseeker library" )
+else( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
+       message( STATUS "Using internal Wadseeker library" )
+       set( WADSEEKER_INTERNAL YES )
+       add_subdirectory( src/wadseeker )
+       set( WADSEEKER_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src/wadseeker" )
+       set( WADSEEKER_INCLUDE_DIR "${WADSEEKER_INCLUDE_DIRS}" )
+endif()
+
 if(MSVC AND NOT MSVC90 AND NOT MSVC12)
        message(WARNING
                "Full automatic packaging is only supported for Microsoft Visual C++ 2008 and 2013. 
"
@@ -134,7 +148,6 @@ add_subdirectory(tools/updaterevision)

 add_subdirectory(src/core)
 add_subdirectory(src/plugins)
-add_subdirectory(src/wadseeker)

 message(STATUS "'INSTALL' will dump files to \"${CMAKE_INSTALL_PREFIX}\"")


(0021859)
WubTheCaptain   
2021-12-09 01:16   
(edited on: 2021-12-09 02:42)
The funny thing is I described this bug way back in 2019. 0003280:0020368

(0021860)
WubTheCaptain   
2021-12-09 01:20   
(edited on: 2021-12-09 01:21)
Because the default value is stupid too:
$ rm CMakeCache.txt
$ cmake -DFORCE_INTERNAL_WADSEEKER=OFF /home/wub/.local/src/doomseeker/doomseeker
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- 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
-- 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
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found BZip2: /usr/lib/x86_64-linux-gnu/libbz2.so (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Could NOT find wadseeker (missing: wadseeker_DIR)
-- Using system zlib
-- Using system bzip2 library
-- Using internal Wadseeker library
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Setting up plugin chocolatedoom. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/chocolate-doom
--     chocolatedoom provides translations
-- Setting up plugin odamex. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/odamex
--     odamex provides translations
-- Setting up plugin srb2. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/srb2
--     srb2 provides translations
-- Setting up plugin zandronum. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/zandronum
--     zandronum provides translations
-- Setting up plugin zandronumq. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/zandronumq
--     zandronumq provides translations
-- Setting up plugin turok2ex. Source dir:
    /home/wub/.local/src/doomseeker/doomseeker/src/plugins/turok2ex
--     turok2ex provides translations
-- 'INSTALL' will dump files to "/usr/local"
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/doomseeker


(0021861)
WubTheCaptain   
2021-12-09 01:43   
Quote from CMakeLists.txt
if ( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
        message( STATUS "Using system Wadseeker library" )
else( wadseeker_FOUND AND NOT FORCE_INTERNAL_WADSEEKER )
        message( STATUS "Using internal Wadseeker library" )
        // ...
endif()

I had to re-read the previous issue to understand how this is not sane to read.
Quote from CMake 3.22.1 Documentation
Per legacy, the else() and endif() commands admit an optional <condition> argument. If used, it must be a verbatim repeat of the argument of the opening if command.

So I am again clueless where the issue is.