AppleWin icon indicating copy to clipboard operation
AppleWin copied to clipboard

Compiling error on Debian testing/trixie

Open nerun opened this issue 1 year ago • 11 comments

I am running Debian testing (Trixie), with both qt5 and qt6 installed. Failed to compile.

Download worked:

$ git clone https://github.com/audetto/AppleWin.git --recursive
Cloning into 'AppleWin'...
remote: Enumerating objects: 31681, done.
remote: Counting objects: 100% (322/322), done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 31681 (delta 172), reused 259 (delta 143), pack-reused 31359 (from 1)
Receiving objects: 100% (31681/31681), 18.46 MiB | 16.38 MiB/s, done.
Resolving deltas: 100% (23774/23774), done.
Submodule 'source/frontends/qt/QHexView' (https://github.com/Dax89/QHexView) registered for path 'source/frontends/qt/QHexView'
Submodule 'source/frontends/sdl/imgui/imgui' (https://github.com/ocornut/imgui) registered for path 'source/frontends/sdl/imgui/imgui'
Submodule 'source/frontends/sdl/imgui/imgui-filebrowser' (https://github.com/AirGuanZ/imgui-filebrowser) registered for path 'source/frontends/sdl/imgui/imgui-filebrowser'
Submodule 'source/frontends/sdl/imgui/imgui_club' (https://github.com/ocornut/imgui_club) registered for path 'source/frontends/sdl/imgui/imgui_club'
Cloning into '/home/daniel/GIT/AppleWin/source/frontends/qt/QHexView'...
remote: Enumerating objects: 1867, done.        
remote: Counting objects: 100% (211/211), done.        
remote: Compressing objects: 100% (108/108), done.        
remote: Total 1867 (delta 106), reused 149 (delta 97), pack-reused 1656 (from 1)        
Receiving objects: 100% (1867/1867), 912.33 KiB | 8.77 MiB/s, done.
Resolving deltas: 100% (1250/1250), done.
Cloning into '/home/daniel/GIT/AppleWin/source/frontends/sdl/imgui/imgui'...
remote: Enumerating objects: 57654, done.        
remote: Counting objects: 100% (11853/11853), done.        
remote: Compressing objects: 100% (416/416), done.        
remote: Total 57654 (delta 11694), reused 11437 (delta 11437), pack-reused 45801 (from 1)        
Receiving objects: 100% (57654/57654), 93.74 MiB | 23.97 MiB/s, done.
Resolving deltas: 100% (45074/45074), done.
Cloning into '/home/daniel/GIT/AppleWin/source/frontends/sdl/imgui/imgui-filebrowser'...
remote: Enumerating objects: 301, done.        
remote: Counting objects: 100% (133/133), done.        
remote: Compressing objects: 100% (62/62), done.        
remote: Total 301 (delta 98), reused 90 (delta 70), pack-reused 168 (from 1)        
Receiving objects: 100% (301/301), 146.55 KiB | 833.00 KiB/s, done.
Resolving deltas: 100% (168/168), done.
Cloning into '/home/daniel/GIT/AppleWin/source/frontends/sdl/imgui/imgui_club'...
remote: Enumerating objects: 393, done.        
remote: Counting objects: 100% (152/152), done.        
remote: Compressing objects: 100% (49/49), done.        
remote: Total 393 (delta 100), reused 135 (delta 86), pack-reused 241 (from 1)        
Receiving objects: 100% (393/393), 116.81 KiB | 2.60 MiB/s, done.
Resolving deltas: 100% (146/146), done.
Submodule path 'source/frontends/qt/QHexView': checked out '40f40f5d6a546646904c094ebefc8216067ab586'
Submodule path 'source/frontends/sdl/imgui/imgui': checked out '71c77c081ac36841e682498229088e7678207112'
Submodule path 'source/frontends/sdl/imgui/imgui-filebrowser': checked out '60d4e09ab1270d94d0115ad8ec40f939e801e105'
Submodule path 'source/frontends/sdl/imgui/imgui_club': checked out 'd4cd9896e15a03e92702a578586c3f91bbde01e8'

But when compiling... What it means?

$ cmake -Wno-dev -DCMAKE_BUILD_TYPE=RELEASE ..
Building everything by default
CMAKE_BUILD_TYPE:                RELEASE
CMAKE_CXX_FLAGS:                 
CMAKE_CXX_FLAGS_RELEASE:         -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG:           -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -O2 -g -DNDEBUG
CMake Warning (dev) at source/CMakeLists.txt:40 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0")
CMake Warning (dev) at source/frontends/common2/CMakeLists.txt:36 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: program_options
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:42 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: Qt::Core

  Targets not yet defined: Qt::CorePrivate

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:72 (include)
  /usr/share/cmake-3.30/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtPublicDependencyHelpers.cmake:111 (find_dependency)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:42 (_qt_internal_find_qt_dependencies)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:53 (include)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:179 (find_package)
  source/frontends/qt/QHexView/CMakeLists.txt:5 (find_package)


CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:179 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake

  but it set Qt6Widgets_FOUND to FALSE so package "Qt6Widgets" is considered
  to be NOT FOUND.
Call Stack (most recent call first):
  source/frontends/qt/QHexView/CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!

All dependencies are installed:

$ sudo apt install $(cat AppleWin/source/linux/raspbian.list.txt)                   AppleWin (Branch: master)
cmake is already the newest version (3.30.5-1).
g++ is already the newest version (4:14.2.0-1).
ninja-build is already the newest version (1.12.1-1).
pkg-config is already the newest version (1.8.1-4).
libyaml-dev is already the newest version (0.2.5-1+b2).
libminizip-dev is already the newest version (1:1.3.dfsg+really1.3.1-1+b1).
qtbase5-dev is already the newest version (5.15.15+dfsg-2).
qtmultimedia5-dev is already the newest version (5.15.15-2).
libqt5gamepad5-dev is already the newest version (5.15.15-2).
libqt5multimedia5-plugins is already the newest version (5.15.15-2).
libboost-program-options-dev is already the newest version (1.83.0.2+b2).
libncurses-dev is already the newest version (6.5-2+b1).
libevdev-dev is already the newest version (1.13.3+dfsg-1).
libsdl2-image-dev is already the newest version (2.8.2+dfsg-1+b2).
libsdl2-dev is already the newest version (2.30.9+dfsg-1).
libgles-dev is already the newest version (1.7.0-1+b2).
libslirp-dev is already the newest version (4.8.0-1+b1).
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0

nerun avatar Nov 24 '24 14:11 nerun

The problem is likely the fact that the external module QHexView tries 1st with QT6 while AppleWin looks for QT5 only.

I don't think the compilation would work for a mixed QT5 / QT6 installation.

For now, if you don't need qapple you can exclude it via some cmake options.

If you only care about sa2, pass -DBUILD_SA2=ON to cmake.

I will have to look into it.

audetto avatar Nov 24 '24 19:11 audetto

It works. But debian package need changes as explained in issue #180 .

I love qapple...

nerun avatar Nov 24 '24 20:11 nerun

I'm running into the same build issues on my Ubuntu 24.04-based distro. I cannot get a successful build anymore and I don't want qapple:

cmake -DBUILD_SA2=ON -DBUILD_APPLEN=ON ..

CMAKE_BUILD_TYPE:                RELEASE
CMAKE_CXX_FLAGS:                 
CMAKE_CXX_FLAGS_RELEASE:         -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG:           -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -O2 -g -DNDEBUG
CMake Warning (dev) at source/CMakeLists.txt:40 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0")
CMake Warning (dev) at source/frontends/common2/CMakeLists.txt:36 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: program_options
-- Configuring done (1.0s)
-- Generating done (0.1s)
-- Build files have been written to: /home/michael/Retro/Apple/Apple II/Emulators/AppleWin Linux Native

make -j16

Building everything by default
CMAKE_BUILD_TYPE:                RELEASE
CMAKE_CXX_FLAGS:                 
CMAKE_CXX_FLAGS_RELEASE:         -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG:           -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -O2 -g -DNDEBUG
CMake Error at /usr/share/cmake-3.30/Modules/CheckIPOSupported.cmake:68 (message):
  IPO is not supported (check failed to compile).
Call Stack (most recent call first):
  /usr/share/cmake-3.30/Modules/CheckIPOSupported.cmake:153 (_ipo_not_supported)
  /usr/share/cmake-3.30/Modules/CheckIPOSupported.cmake:261 (_ipo_run_language_check)
  CMakeLists.txt:50 (check_ipo_supported)


-- Configuring incomplete, errors occurred!
make: *** [Makefile:349: cmake_check_build_system] Error 1

xandark avatar Dec 04 '24 05:12 xandark

Okay, I pulled everything and I'm still having a build failure:

make clean

cmake -DBUILD_SA2=ON -DBUILD_APPLEN=ON ..

CMAKE_BUILD_TYPE:                RELEASE
CMAKE_CXX_FLAGS:                 
CMAKE_CXX_FLAGS_RELEASE:         -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG:           -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -O2 -g -DNDEBUG
CMake Warning (dev) at source/CMakeLists.txt:40 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0")
CMake Warning (dev) at source/frontends/common2/CMakeLists.txt:36 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: program_options
-- Configuring done (0.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/michael/Retro/Apple/Apple II/Emulators/AppleWin Linux Native

make -j16

Building everything by default
CMAKE_BUILD_TYPE:                RELEASE
CMAKE_CXX_FLAGS:                 
CMAKE_CXX_FLAGS_RELEASE:         -O3 -DNDEBUG
CMAKE_CXX_FLAGS_DEBUG:           -g
CMAKE_CXX_FLAGS_RELWITHDEBINFO:  -O2 -g -DNDEBUG
CMake Warning (dev) at source/CMakeLists.txt:40 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0")
CMake Warning (dev) at source/frontends/common2/CMakeLists.txt:36 (find_package):
  Policy CMP0167 is not set: The FindBoost module is removed.  Run "cmake
  --help-policy CMP0167" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.83.0/BoostConfig.cmake (found version "1.83.0") found components: program_options
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtPublicCMakeHelpers.cmake:371 (message):
  Some (but not all) targets in this export set were already defined.

  Targets Defined: Core

  Targets not yet defined: CorePrivate

Call Stack (most recent call first):
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreVersionlessAliasTargets.cmake:3 (_qt_internal_check_multiple_inclusion)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Core/Qt6CoreConfig.cmake:181 (include)
  /usr/share/cmake-3.30/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtPublicDependencyHelpers.cmake:143 (find_dependency)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsDependencies.cmake:43 (_qt_internal_find_qt_dependencies)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake:53 (include)
  /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:191 (find_package)
  source/frontends/qt/QHexView/CMakeLists.txt:5 (find_package)


CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:191 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake

  but it set Qt6Widgets_FOUND to FALSE so package "Qt6Widgets" is considered
  to be NOT FOUND.
Call Stack (most recent call first):
  source/frontends/qt/QHexView/CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
make: *** [Makefile:349: cmake_check_build_system] Error 1

xandark avatar Dec 06 '24 22:12 xandark

I am not sure what happens exactly.

  1. which version of cmake do you use? I run 24-04 and I am on 3.28.3. More recent versions have changed the logic around finding boost. I will setup a VM with 24-10 and try it.

  2. if you pass -DBUILD_SA2=ON -DBUILD_APPLEN=ON it should not attempt to configure Qt. cmake options are sticky, so make sure you completely remove the build folder and try again.

audetto avatar Dec 07 '24 14:12 audetto

After last update, got this error when creating DEB package:

$ cpack -G deb                                                                                                                                                                          AppleWin (Branch: master)
CPack Error: Could not create CPack generator: deb

Generators
  7Z                           = 7-Zip file format
  DEB                          = Debian packages
  External                     = CPack External packages
  IFW                          = Qt Installer Framework
  INNOSETUP                    = Inno Setup packages
  NSIS                         = Null Soft Installer
  NSIS64                       = Null Soft Installer (64-bit)
  NuGet                        = NuGet packages
  RPM                          = RPM packages
  STGZ                         = Self extracting Tar GZip compression
  TBZ2                         = Tar BZip2 compression
  TGZ                          = Tar GZip compression
  TXZ                          = Tar XZ compression
  TZ                           = Tar Compress compression
  TZST                         = Tar Zstandard compression
  ZIP                          = ZIP file format

nerun avatar Dec 07 '24 14:12 nerun

Okay, your answer helped me solve it. The build instructions in .github/README.md are outdated and were tripping me up. It says:

Building

cd AppleWin
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make

... but it should say:

Building

cd AppleWin
cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SA2=ON -DBUILD_APPLEN=ON -DBUILD_{whatever}=ON .
make

Note now only one . at the end of the cmake line, not .. The build directory doesn't seem to be used anymore, at least as far as I can tell. So I just omitted that, which makes it easier IMO.

xandark avatar Dec 08 '24 04:12 xandark

BTW, very nice that there's only 5 warnings when rebuilding.

xandark avatar Dec 08 '24 04:12 xandark

BTW, very nice that there's only 5 warnings when rebuilding.

The goal is 0, but I am a bit reluctant to silence -Wunused-result, I want to fix it properly.

audetto avatar Dec 08 '24 08:12 audetto

After last update, got this error when creating DEB package:

$ cpack -G deb              
CPack Error: Could not create CPack generator: deb

where do you get this syntax from?

it needs to be cpack -G DEB. cpack -g deb works too, but I can't see it documented anywhere.

see https://github.com/audetto/AppleWin?tab=readme-ov-file#packaging

audetto avatar Dec 08 '24 08:12 audetto

Worked now. Tried in a VM with Debian Bookworm 12.8:

$ cd AppleWin
$ cmake -DBUILD_SA2=ON -DBUILD_APPLEN=ON -DBUILD_LIBRETO=ON -DBUILD_QAPPLE=ON .
$ make
$ cpack -G DEB

Worked like a charm. Created debian package with qapple, sa2 and applen binaries successful.

Received just a warning saying that LIBRETO was not used. But frontend selection says it is an option.

EDIT

Tested now the standard way, in the same VM and worked too:

$ cd AppleWin
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=RELEASE ..
$ make
$ cpack -G DEB

This time no warning about LIBRETO.

nerun avatar Dec 08 '24 13:12 nerun

This seems solved.

audetto avatar Mar 20 '25 20:03 audetto