Zandronum Chat on our Discord Server Get the latest version: 3.2
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003931Doomseeker[All Projects] Bugpublic2021-12-09 01:032021-12-09 02:42
ReporterWubTheCaptain 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Platformamd64OSDebianOS Versionbookworm/sid
Product Version1.3 
Target VersionFixed in Version 
Summary0003931: libwadseeker-dev 2.1: Using internal Wadseeker library
DescriptionNot 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.
Steps To Reproduce
$ 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
Additional Information
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.
Attached Files

- Relationships
related to 0003280closedZalewa Make building Doomseeker and libwadseeker as independent steps feasible 

-  Notes
User avatar (0021858)
WubTheCaptain (reporter)
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}\"")


User avatar (0021859)
WubTheCaptain (reporter)
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

User avatar (0021860)
WubTheCaptain (reporter)
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


User avatar (0021861)
WubTheCaptain (reporter)
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.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2021-12-09 01:03 WubTheCaptain New Issue
2021-12-09 01:04 WubTheCaptain Description Updated View Revisions
2021-12-09 01:12 WubTheCaptain Note Added: 0021858
2021-12-09 01:12 WubTheCaptain Assigned To => Pol M
2021-12-09 01:12 WubTheCaptain Status new => assigned
2021-12-09 01:15 WubTheCaptain Relationship added related to 0003280
2021-12-09 01:16 WubTheCaptain Note Added: 0021859
2021-12-09 01:20 WubTheCaptain Note Added: 0021860
2021-12-09 01:21 WubTheCaptain Note Edited: 0021860 View Revisions
2021-12-09 01:22 WubTheCaptain Product Version 1.3.2 => 1.3
2021-12-09 01:43 WubTheCaptain Note Added: 0021861
2021-12-09 01:43 WubTheCaptain Assigned To Pol M =>
2021-12-09 01:43 WubTheCaptain Status assigned => new
2021-12-09 01:48 WubTheCaptain Note Added: 0021862
2021-12-09 01:48 WubTheCaptain Note Edited: 0021862 View Revisions
2021-12-09 02:42 WubTheCaptain Note Edited: 0021858 View Revisions
2021-12-09 02:42 WubTheCaptain Note Edited: 0021859 View Revisions
2021-12-09 02:44 WubTheCaptain Note View State: 0021862: private
2021-12-09 02:44 WubTheCaptain Note Deleted: 0021862






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker