Install CopperSpice 1.8 from source in Windows

Discuss issues related to installing or building
Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, All!

I'm trying to install CopperSpice 1.8. It doesn't work. Earlier two years ago, CopperSpice according to this recipe was installed well.

Windows 11 64 bit.
1. Installed msys2 in the C directory:\msys64 . Downloaded from here https://www.msys2.org .
2. Installed CMake 3.25.0 in C:\CMake . Downloaded from here - https://cmake.org/download / .
3. Launched the MSYS2 MINGW64 terminal.
4. In this terminal executed the commands:
4.1 pacman -S mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mc mingw-w64-x86_64-openssl mc
4.2 pacman -Syu
5. Clone https://github.com/copperspice/copperspice into C:\CS
6. Install Ninja into C:\Ninja . Version 1.11.1
7. Add C:\CMake\bin and C:\Ninja and C:\msys64\mingw64\bin into Path
8. Created folders C:\cs_build , C:\cs_lib and C:\cs_prg .
9. In the folder C:\cs_prg created three bat files

The CopperSpice1 file.bat :

cd C:/cs_build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=C:/cs_lib ^
-DPostgreSQL_ROOT=C:/PostgreSQL/15 ^
C:/CS

CopperSpice2.bat file :

cd C:/cs_build
ninja -j2

The CopperSpice3 file.bat :

cd C:/cs_build
ninja install

10. C:\cs_prg\CopperSpice1.bat => C:\Test\Log1.txt
11. C:\cs_prg\CopperSpice2.bat => C:\Test\Log2.txt

I also tried instead of MSYS2, I tried installing the x86_64-7.3.0-release-posix-seh-rt_v5-rev0.7z archive, which is on the CopperSpice website
I installed it in the directory C:\mingw64 \ . Set the Path system variable to C:\mingw64\bin . But it still doesn't work out!
The end of the output to the console I wrote to a file C:\Test\Logmingw64_7.txt

Log files in arhive this - https://dropmefiles.com/zzpdl .
This is new link to log file. https://dropmefiles.com/wjNnP
The file sharing service archived the previous file with the password 123 .

Tell me, please, what am I doing wrong?
Of course, I would like CopperSpice to work on gcc versions 12.2 and later.

Thank You!
With best regards, Navadvipa Chandra das.

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, All!

I tried to compile a Copper Spice on Microsoft Visual Studio and it also stumbled in the same place, but it already gave out a very important message:

Error C1083 Unable to open file inclusion: zlib.h: No such file or directory, C:\CopperSpice\Source\out\build\x64-Debug\Source C:\CopperSpice\Source\src\svg\qsvgtinydocument.cpp 37

So you either need to install ZLIB on your computer (there are no instructions on this case) or define a special CMake variable
-DCMAKE_DISABLE_FIND_PACKAGE_ZLIB=TRUE

Hare Krishna!
With best regards, Navadvipa Chandra das.

barbara
Posts: 370
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: Install CopperSpice 1.8 from source in Windows

Post by barbara »

Thanks for the updated information. So if you use our recommended tool chain and the bundled version of ZLIB can you successfully build CopperSpice?

1) We would like to test building on MSVC for you. Can you tell us exactly which version you want to use?

2) Our team is working on a release for a newer version of MinGW. This has been moved to a high priority for us.

MSys2 has never been a supported platform due to the rolling release and a few other issues with their toolchain.

Barbara

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, Barbara and All!

Thank You!

I unpacked the zlib 1.2.13 library into a directory C:\ZLIB , then added this path to the Path system variable, but it didn't help. Now I have fixed the file CMakeList.txt ^
if (NOT ZLIB_FOUND)
include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/zlib)
else()
include_directories(C:/ZLIB )
endif()

Now I'm trying. Experiments take a very long time.

I want, of course, a new version of CopperSpice 1.8.0, which is designed for the new GCC.

I tested - the build does not work either with GCC or with Visual Studio . It shows a lot of errors.

Thank You!
Hare Krishna!
With best regards, Navadvipa Chandra das.

barbara
Posts: 370
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: Install CopperSpice 1.8 from source in Windows

Post by barbara »

I tested - the build does not work either with GCC or with Visual Studio . It shows a lot of errors.
Please keep in mind that CS 1.8.0 builds on our CI for every supported platform, including building with MinGW and MSVC on Windows.

a) As a test please use our bundled ZLIB for right now.

b) Do you get errors when running CMake or when compiling and running Ninja?

c) If you have several errors please save the output to a file and email it to info @ copperspice.com.

Barbara

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, Barabara and All!

Errors, when working Ninja! Sent errors!

Hare Krishna!
With best regards, Navadvipa Chandra das.

barbara
Posts: 370
Joined: Sat Apr 04 2015 2:32 am
Contact:

Re: Install CopperSpice 1.8 from source in Windows

Post by barbara »

Thank you for sending the ninja compiler output. We found something interesting when you are compiling the CsWebKit library. Please take a look at the following lines lifted from your log.
In file included from C:/CopperSpice/Source/src/3rdparty/webkit/Source/WebKit/qt/Api/qwebframe.cpp:21:0:
C:/PostgreSQL/15/include/config.h:887:0: warning: "DLL_VARIABLE" redefined
#define DLL_VARIABLE __declspec (dllimport)

C:/PostgreSQL/15/include/config.h:882:0: note: this is the location of the previous definition
# define DLL_VARIABLE
When compiling qwebframe.cpp the first include line is looking for "config.h". This should include a file from "3rdparty/webkit/Source/WebCore". Your set up appears to be pulling in a header from PostgreSQL, which will not work.

1 Did you list the PostgreSQL include path in your environment? This is not something we recommend.

2 We recommend adding a command to define "PostgreSQL_ROOT" in your environment or your CMake script.

3 Our CI has been testing with several versions of PostgreSQL and there is a file called "pg_config.h" however we do not have a file in the include folder called "config.h". Is this a file you added? As a test please remove this file or rename it and then compile CopperSpice again.

Barbara

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, Barbara and All!

I removed Pa+th from the system variable C:\PostgreSQL\15 and everything worked very well! You're just magicians. In Release mode, it compiles well. In Debug mode, it does not compile, writes that the file is too large:

Code: Select all

[514/3826] Generating qrc_qprintdialog.cpp
[515/3826] Generating ui_qfiledialog.h
[516/3826] Generating qrc_qstyle.cpp
[517/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblebridge.cpp.obj
[518/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblecache.cpp.obj
[519/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblemenu.cpp.obj
[520/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessible.cpp.obj
[521/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessibleplugin.cpp.obj
[522/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessibleobject.cpp.obj
[523/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget.cpp.obj
[524/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj
FAILED: src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj 
C:\mingw64\bin\c++.exe @src\gui\CMakeFiles\CsGui.dir\accessible\qaccessiblewidget_common.cpp.obj.rsp -MD -MT src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj -MF src\gui\CMakeFiles\CsGui.dir\accessible\qaccessiblewidget_common.cpp.obj.d -o src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj -c C:/CopperSpice/Source/src/gui/accessible/qaccessiblewidget_common.cpp
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe: src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj: section .data$_ZZN8QVariant12registerTypeI7QCursorEEjvE8typeName: string table overflow at offset 10000035
C:\Users\navad\AppData\Local\Temp\ccdyn62o.s: Assembler messages:

C:\Users\navad\AppData\Local\Temp\ccdyn62o.s: Fatal error: can't close src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_common.cpp.obj: File too big

[525/3826] Building CXX object src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj
FAILED: src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj 
C:\mingw64\bin\c++.exe @src\gui\CMakeFiles\CsGui.dir\accessible\qaccessiblewidget_complex.cpp.obj.rsp -MD -MT src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj -MF src\gui\CMakeFiles\CsGui.dir\accessible\qaccessiblewidget_complex.cpp.obj.d -o src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj -c C:/CopperSpice/Source/src/gui/accessible/qaccessiblewidget_complex.cpp
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.3.0/../../../../x86_64-w64-mingw32/bin/as.exe: src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj: section .xdata$_ZNSt8__detail9__variant15_Variadic_unionIJjxydf7QChar328QString8P7QObjectPvSt10shared_ptrIN8QVariant10CustomTypeEEEEC1ILy9EJS7_I12CustomType_TIN9QComboBox16SizeAdjustPolicyEEEEEESt16in_place_index_tIXT_EEDpOT0_: string table overflow at offset 10000118

C:\Users\navad\AppData\Local\Temp\cc1pw2at.s: Assembler messages:

C:\Users\navad\AppData\Local\Temp\cc1pw2at.s: Fatal error: can't close src/gui/CMakeFiles/CsGui.dir/accessible/qaccessiblewidget_complex.cpp.obj: File too big

[526/3826] Linking CXX shared library bin\libCsNetwork1.8.dll
ninja: build stopped: subcommand failed.

And another unpleasant thing was when C:\PostgreSQL\15 was written to the Path system variable:

-- ZLIB was found, path is C:/PostgreSQL/15/lib/zdll.lib


Hare Krishna! Thank You!
With best regards, Navadvipa Chandra das.

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, All!

I looked at the file CMakeList.txt and I realized that something went wrong with me, since the mbig-obj compiler flag was provided during compilation. And he successfully got into the compilation commands! But is everything OK in Release mode, and in Debug mode - stop, because the obj file is too big!

I also have another very important question! I will give my bat file, which shows where I installed the Copper Spice and also the bat file, how I want to install KitchenSink.

CopperSpice.bat

Code: Select all

cd C:/CopperSpice/Release/Build

cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=C:/CopperSpice/Release/Lib ^
-DPostgreSQL_ROOT=C:/PostgreSQL/15 ^
C:/CopperSpice/Source

ninja -j3

ninja install
KitchenSink.bat

Code: Select all

cd C:/PrgCS/KitchenSink/Release/Build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=C:/PrgCS/KitchenSink/Release/Bin ^
C:/PrgCS/KitchenSink/Source

ninja -j3
ninja install
In file C:\PrgCS\KitchenSink\Source\CMakeLists.txt I add
set( CopperSpice_DIR "C:/CopperSpice/Release/Lib" )

Since CMake can't find the CopperSpice package! The most important directory for Copper Spice is just the folder - C:/CopperSpice/Release/Lib

Code: Select all


C:\PrgCS\KitchenSink>cd C:/PrgCS/KitchenSink/Release/build 

C:\PrgCS\KitchenSink\Release\Build>cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:/PrgCS/KitchenSink/Release/Bin C:/PrgCS/KitchenSink/Source 
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/mingw64/bin/gcc.exe - 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: C:/mingw64/bin/c++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "C:/PrgCS/KitchenSink/Release/Build/CMakeFiles/CMakeOutput.log".

C:\PrgCS\KitchenSink\Release\Build>ninja -j3 

C:\PrgCS\KitchenSink\Release\Build>ninja install 

Code: Select all

C:\PrgCS\KitchenSink>C:\PrgCS\KitchenSink\KitchenSink.bat => C:/PrgCS/KitchenSink/Log/KinthenSink.txt                                       CMake Error at CMakeLists.txt:25 (find_package):
  By not providing "FindCopperSpice.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "CopperSpice", but CMake did not find one.

  Could not find a package configuration file provided by "CopperSpice" with
  any of the following names:

    CopperSpiceConfig.cmake
    copperspice-config.cmake

  Add the installation prefix of "CopperSpice" to CMAKE_PREFIX_PATH or set
  "CopperSpice_DIR" to a directory containing one of the above files.  If
  "CopperSpice" provides a separate development package or SDK, be sure it
  has been installed.
  
How do I set up a CopperSpice package search?

Thank You!
With best regards, Navadvipa Chandra das.

Navadvipa Chandra d
Posts: 15
Joined: Sun Apr 19 2020 7:02 pm

Re: Install CopperSpice 1.8 from source in Windows

Post by Navadvipa Chandra d »

Hare Krishna, Barbara and All!

Lord Sri Krishna inspired me to use the method of scientific poking and it helped!

Code: Select all

set(BUILD_COMPONENTS "KitchenSink")
# add this row
set( CopperSpice_DIR "C:/CopperSpice/Release/Lib/cmake/CopperSpice" )
And it's even better to use this setting in a bat file!

KitchenSink.bat

Code: Select all

cd C:/PrgCS/KitchenSink/Release/build
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_INSTALL_PREFIX=C:/PrgCS/KitchenSink/Release/Bin ^
-DCopperSpice_DIR="C:/CopperSpice/Release/Lib/cmake/CopperSpice" ^
C:/PrgCS/KitchenSink/Source

ninja -j3
ninja install
Now there is one problem with too large obj files in Debug compilation mode. But, it is better not to waste time on an old compiler that has been around for many many years, but to focus on the brand-new GCC 12.2 compiler and debug everything for it, well, and raise the C++ standard more than C++17.

Thank You!
Hare Krishna!
With best regards, Navadvipa Chandra das.

Post Reply