Closed vowstar closed 8 months ago
I'm currently unable to reproduce this. Can you try performing a clean build (destroying the build directory and starting over)? If the problem persists, can you please share the complete terminal log from start to finish from your clean build?
Thank you for your patient response. In order to conveniently reproduce this issue and to demonstrate its prevalence across most Linux distributions, I have constructed a minimal reproduction environment using Docker, based on the debian:bookworm
distribution. To replicate the issue, simply ensure Docker is installed, save the following content as a Dockerfile
, and then run docker build -t issue-65 .
. This will reproduce the problem.
Dockerfile:
FROM debian:bookworm
LABEL maintainer="Huang Rui <vowstar at gmail.com>"
## Configure packages
RUN DEBIAN_FRONTEND=noninteractive apt-get update -qq && \
DEBIAN_FRONTEND=noninteractive apt-get install -yq \
'^qt6-.*-dev' \
build-essential \
cmake \
ninja-build \
git \
&& \
apt-get clean && rm -rf /var/cache/apt/archives && rm -rf /var/cache/apt/lists
## Clone GPDS
RUN git clone https://github.com/simulton/gpds.git
## Build and Install GPDS
RUN cd gpds && \
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DGPDS_BUILD_STATIC=OFF \
-DGPDS_BUILD_SHARED=ON \
-DGPDS_BUILD_TESTS=OFF \
-DGPDS_BUILD_EXAMPLES=OFF \
&& \
cmake --build build --target install
## Clone QSchematic
RUN git clone https://github.com/simulton/QSchematic.git
## Build and Install QSchematic
RUN cd QSchematic && \
cmake -B build -G Ninja \
-DQSCHEMATIC_BUILD_STATIC=OFF \
-DQSCHEMATIC_BUILD_DEMO=OFF \
-DQSCHEMATIC_DEPENDENCY_GPDS_TARGET:STRING="gpds::gpds-shared" \
-DQSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD=OFF \
&& \
cmake --build build --target install
Command to reproduce:
docker build -t issue-65 .
The result:
Sending build context to Docker daemon 3.072kB
Step 1/8 : FROM debian:bookworm
---> 52f537fe0336
...
...
Step 8/8 : RUN cd QSchematic && cmake -B build -G Ninja -DQSCHEMATIC_BUILD_STATIC=OFF -DQSCHEMATIC_BUILD_DEMO=OFF -DQSCHEMATIC_DEPENDENCY_GPDS_TARGET:STRING="gpds::gpds-shared" -DQSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD=OFF && cmake --build build --target install
---> Running in 8ccfdebe97f5
-- The CXX 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
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.5.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
--
-- -------------------------
-- QSchematic configuration:
-- version : 1.5.1
--
-- Build
-- Static : OFF
-- Shared : ON
-- Demo : OFF
--
-- Dependencies
-- GPDS
-- Download : OFF
-- Target : gpds::gpds-shared
-- -------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /QSchematic/build
...
...
FAILED: qschematic/wire_system/test/CMakeFiles/qschematic-wiresystem-tests.dir/tests/wire.cpp.o
/usr/bin/c++ -MD -MT qschematic/wire_system/test/CMakeFiles/qschematic-wiresystem-tests.dir/tests/wire.cpp.o -MF qschematic/wire_system/test/CMakeFiles/qschematic-wiresystem-tests.dir/tests/wire.cpp.o.d -o qschematic/wire_system/test/CMakeFiles/qschematic-wiresystem-tests.dir/tests/wire.cpp.o -c /QSchematic/qschematic/wire_system/test/tests/wire.cpp
In file included from /QSchematic/qschematic/wire_system/test/tests/wire.cpp:2:
/QSchematic/qschematic/wire_system/test/tests/../../manager.hpp:5:10: fatal error: QObject: No such file or directory
5 | #include <QObject>
| ^~~~~~~~~
compilation terminated.
[12/49] Automatic MOC for target qschematic-shared
[13/49] Building CXX object qschematic/wire_system/test/CMakeFiles/qschematic-wiresystem-tests.dir/test_main.cpp.o
ninja: build stopped: subcommand failed.
The command '/bin/sh -c cd QSchematic && cmake -B build -G Ninja -DQSCHEMATIC_BUILD_STATIC=OFF -DQSCHEMATIC_BUILD_DEMO=OFF -DQSCHEMATIC_DEPENDENCY_GPDS_TARGET:STRING="gpds::gpds-shared" -DQSCHEMATIC_DEPENDENCY_GPDS_DOWNLOAD=OFF && cmake --build build --target install' returned a non-zero code: 1
Thank you for providing this information. I am able to reproduce it. Should be able to provide a fix very soon.
Can you check whether the latest master
branch is working for you?
We can provide a new release afterwards to help your packaging efforts.
Thank you so much for your prompt response and for addressing the issue. I have tested the latest master
branch, and I'm happy to confirm that the problem has been successfully resolved.
Your swift action is greatly appreciated and will significantly aid in our packaging efforts. Looking forward to the new release!
Thank you for confirming that it's working now.
Release 1.6.0
has just landed - Happy packaging!
Build faild when disable DQSCHEMATIC_BUILD_STATIC under linux, but enable DQSCHEMATIC_BUILD_STATIC it build success.
OS: Gentoo Linux GCC: gcc version 13.2.1 20240210 (Gentoo Hardened 13.2.1_p20240210 p13) QT: QT6