discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Trouble building OpenSCAD from source

FH
Father Horton
Mon, Jan 17, 2022 12:45 AM

I'm running Linux 20.2 in VirtualBox. Building from source is producing
this:

CMake Error at CMakeLists.txt:66 (string):
string sub-command REPLACE requires at least four arguments.

-- Eigen3: 3.3.7
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.36") found components:
filesystem system regex program_options
-- Boost: 1.71.0
-- Harfbuzz: 2.6.4
-- Fontconfig:
-- running openscad/cmake/Modules/FindGLIB2.cmake ...
-- saving pkg-config env
-- GLIB2_VERSION 2.64.6
-- GLIB2_LIBRARY_DIRS
-- GLIB2_INCLUDE_DIRS:
--  /usr/include/glib-2.0
--  /usr/lib/x86_64-linux-gnu/glib-2.0/include
-- GLIB2_LIBDIR /usr/lib/x86_64-linux-gnu
-- GLIB2_LIBRARIES:
--  /usr/lib/x86_64-linux-gnu/libglib-2.0.so
-- restoring pkg-config env
-- Glib: 2.64.6
-- OpenCSG:
-- GLEW_INCLUDE_DIR: /usr/include
-- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- OpenGL:
/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.48")
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math
-- CGAL: 5.00
-- CGAL: Using target CGAL::CGAL CGAL::CGAL_Core
-- libzip: 1.5.1
-- Freetype: 2.10.1
-- LibXml2: 2.9.10
-- HIDAPI: disabled
-- Cairo: 1.16.0
-- Flex: 2.6.4
-- Bison: 3.5.1
-- lib3mf: 1.8.1
-- Qt5: 5.12.8
-- QScintilla: 2.11.2
-- DBus input driver enabled
-- Qt5Gamepad input driver disabled as the Qt5Gamepad module could not be
found.
-- Offscreen OpenGL Context - using Unix GLX on X11

--
---===
-- OpenSCAD Build Configuration Summary

---===

-- CMAKE_BUILD_TYPE:
-- CMAKE_PREFIX_PATH:
-- SUFFIX:

-- Experimental Features: OFF
-- Snapshot build:        OFF
-- Headless build:        OFF
-- NULLGL build:          OFF
-- Profiling/coverage:    OFF
-- CSG node id-prefix:    OFF

-- lib3mf:                API 1.x

-- Input Drivers
-- - HID API Driver (disabled)
-- - Space Navigator Library Driver (disabled)
-- - Joystick Driver (enabled)
-- - DBus Remote Driver (enabled)

-- DEFINES =
_REENTRANT;UNICODE;_UNICODE;STACKSIZE=8388608;EIGEN_DONT_ALIGN;ENABLE_OPENCSG;ENABLE_CGAL;CGAL_DEBUG;ENABLE_LIBZIP;ENABLE_CAIRO;USE_QOPENGLWIDGET;USE_SCINTILLA_EDITOR;ENABLE_MDI;ENABLE_DBUS;OPENSCAD_VERSION=2022.01.16;OPENSCAD_SHORTVERSION=2022.01.16;OPENSCAD_YEAR=2022;OPENSCAD_MONTH=1;OPENSCAD_DAY=16;ENABLE_JOYSTICK

-- ImageMagick convert executable found: /usr/bin/convert
-- creating CTestCustom.cmake
-- Configuring incomplete, errors occurred!


What do I do now?

I'm running Linux 20.2 in VirtualBox. Building from source is producing this: CMake Error at CMakeLists.txt:66 (string): string sub-command REPLACE requires at least four arguments. -- Eigen3: 3.3.7 -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.36") found components: filesystem system regex program_options -- Boost: 1.71.0 -- Harfbuzz: 2.6.4 -- Fontconfig: -- running openscad/cmake/Modules/FindGLIB2.cmake ... -- saving pkg-config env -- GLIB2_VERSION 2.64.6 -- GLIB2_LIBRARY_DIRS -- GLIB2_INCLUDE_DIRS: -- /usr/include/glib-2.0 -- /usr/lib/x86_64-linux-gnu/glib-2.0/include -- GLIB2_LIBDIR /usr/lib/x86_64-linux-gnu -- GLIB2_LIBRARIES: -- /usr/lib/x86_64-linux-gnu/libglib-2.0.so -- restoring pkg-config env -- Glib: 2.64.6 -- OpenCSG: -- GLEW_INCLUDE_DIR: /usr/include -- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so -- OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so -- Using header-only CGAL -- Targetting Unix Makefiles -- Using /usr/bin/c++ compiler. -- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.48") -- Boost include dirs: /usr/include -- Boost libraries: -- Using gcc version 4 or later. Adding -frounding-math -- CGAL: 5.00 -- CGAL: Using target CGAL::CGAL CGAL::CGAL_Core -- libzip: 1.5.1 -- Freetype: 2.10.1 -- LibXml2: 2.9.10 -- HIDAPI: disabled -- Cairo: 1.16.0 -- Flex: 2.6.4 -- Bison: 3.5.1 -- lib3mf: 1.8.1 -- Qt5: 5.12.8 -- QScintilla: 2.11.2 -- DBus input driver enabled -- Qt5Gamepad input driver disabled as the Qt5Gamepad module could not be found. -- Offscreen OpenGL Context - using Unix GLX on X11 -- -- ==================================== -- OpenSCAD Build Configuration Summary -- ==================================== -- -- CMAKE_BUILD_TYPE: -- CMAKE_PREFIX_PATH: -- SUFFIX: -- -- Experimental Features: OFF -- Snapshot build: OFF -- Headless build: OFF -- NULLGL build: OFF -- Profiling/coverage: OFF -- CSG node id-prefix: OFF -- -- lib3mf: API 1.x -- -- Input Drivers -- - HID API Driver (disabled) -- - Space Navigator Library Driver (disabled) -- - Joystick Driver (enabled) -- - DBus Remote Driver (enabled) -- -- DEFINES = _REENTRANT;UNICODE;_UNICODE;STACKSIZE=8388608;EIGEN_DONT_ALIGN;ENABLE_OPENCSG;ENABLE_CGAL;CGAL_DEBUG;ENABLE_LIBZIP;ENABLE_CAIRO;USE_QOPENGLWIDGET;USE_SCINTILLA_EDITOR;ENABLE_MDI;ENABLE_DBUS;OPENSCAD_VERSION=2022.01.16;OPENSCAD_SHORTVERSION=2022.01.16;OPENSCAD_YEAR=2022;OPENSCAD_MONTH=1;OPENSCAD_DAY=16;ENABLE_JOYSTICK -- -- ImageMagick convert executable found: /usr/bin/convert -- creating CTestCustom.cmake -- Configuring incomplete, errors occurred! ------------------------------ What do I do now?
HL
Hans L
Mon, Jan 17, 2022 8:50 AM

What version of cmake do you have?  "cmake --version"
What exact command do you call cmake with?  Are you setting
-DCMAKE_BUILD_TYPE=Release|Debug|etc ?
The easiest fix would be to just comment out that line 66 (with a hash
character #), as it is fairly inconsequential.  It downgrades the default
optimization level from -O3 to -O2, for consistency with the now defunct
qmake builds.  On previous versions of cmake the default optimzation level
for Release builds was -O3, but maybe that has changed recently.

I am guessing that for some reason, your CMAKE_CXX_FLAGS_RELEASE is
actually an empty string, so cmake is not "seeing" that as the 4th
parameter to the string(REPLACE ) command.
If I'm correct then I think that surrounding the variable reference on that
line with double quotes might be the way to fix it properly.  So this:
${CMAKE_CXX_FLAGS_RELEASE}
would become this:
"${CMAKE_CXX_FLAGS_RELEASE}"

  • Hans

On Sun, Jan 16, 2022 at 6:45 PM Father Horton fatherhorton@gmail.com
wrote:

I'm running Linux 20.2 in VirtualBox. Building from source is producing
this:

CMake Error at CMakeLists.txt:66 (string):
string sub-command REPLACE requires at least four arguments.

-- Eigen3: 3.3.7
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.36") found components:
filesystem system regex program_options
-- Boost: 1.71.0
-- Harfbuzz: 2.6.4
-- Fontconfig:
-- running openscad/cmake/Modules/FindGLIB2.cmake ...
-- saving pkg-config env
-- GLIB2_VERSION 2.64.6
-- GLIB2_LIBRARY_DIRS
-- GLIB2_INCLUDE_DIRS:
--  /usr/include/glib-2.0
--  /usr/lib/x86_64-linux-gnu/glib-2.0/include
-- GLIB2_LIBDIR /usr/lib/x86_64-linux-gnu
-- GLIB2_LIBRARIES:
--  /usr/lib/x86_64-linux-gnu/libglib-2.0.so
-- restoring pkg-config env
-- Glib: 2.64.6
-- OpenCSG:
-- GLEW_INCLUDE_DIR: /usr/include
-- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so
-- OpenGL:
/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so
-- Using header-only CGAL
-- Targetting Unix Makefiles
-- Using /usr/bin/c++ compiler.
-- Found Boost:
/usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found
suitable version "1.71.0", minimum required is "1.48")
-- Boost include dirs: /usr/include
-- Boost libraries:
-- Using gcc version 4 or later. Adding -frounding-math
-- CGAL: 5.00
-- CGAL: Using target CGAL::CGAL CGAL::CGAL_Core
-- libzip: 1.5.1
-- Freetype: 2.10.1
-- LibXml2: 2.9.10
-- HIDAPI: disabled
-- Cairo: 1.16.0
-- Flex: 2.6.4
-- Bison: 3.5.1
-- lib3mf: 1.8.1
-- Qt5: 5.12.8
-- QScintilla: 2.11.2
-- DBus input driver enabled
-- Qt5Gamepad input driver disabled as the Qt5Gamepad module could not be
found.
-- Offscreen OpenGL Context - using Unix GLX on X11

--
---===
-- OpenSCAD Build Configuration Summary

---===

-- CMAKE_BUILD_TYPE:
-- CMAKE_PREFIX_PATH:
-- SUFFIX:

-- Experimental Features: OFF
-- Snapshot build:        OFF
-- Headless build:        OFF
-- NULLGL build:          OFF
-- Profiling/coverage:    OFF
-- CSG node id-prefix:    OFF

-- lib3mf:                API 1.x

-- Input Drivers
-- - HID API Driver (disabled)
-- - Space Navigator Library Driver (disabled)
-- - Joystick Driver (enabled)
-- - DBus Remote Driver (enabled)

-- DEFINES =
_REENTRANT;UNICODE;_UNICODE;STACKSIZE=8388608;EIGEN_DONT_ALIGN;ENABLE_OPENCSG;ENABLE_CGAL;CGAL_DEBUG;ENABLE_LIBZIP;ENABLE_CAIRO;USE_QOPENGLWIDGET;USE_SCINTILLA_EDITOR;ENABLE_MDI;ENABLE_DBUS;OPENSCAD_VERSION=2022.01.16;OPENSCAD_SHORTVERSION=2022.01.16;OPENSCAD_YEAR=2022;OPENSCAD_MONTH=1;OPENSCAD_DAY=16;ENABLE_JOYSTICK

-- ImageMagick convert executable found: /usr/bin/convert
-- creating CTestCustom.cmake
-- Configuring incomplete, errors occurred!


What do I do now?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

What version of cmake do you have? "cmake --version" What exact command do you call cmake with? Are you setting -DCMAKE_BUILD_TYPE=Release|Debug|etc ? The easiest fix would be to just comment out that line 66 (with a hash character #), as it is fairly inconsequential. It downgrades the default optimization level from -O3 to -O2, for consistency with the now defunct qmake builds. On previous versions of cmake the default optimzation level for Release builds was -O3, but maybe that has changed recently. I am guessing that for some reason, your CMAKE_CXX_FLAGS_RELEASE is actually an empty string, so cmake is not "seeing" that as the 4th parameter to the string(REPLACE ) command. If I'm correct then I think that surrounding the variable reference on that line with double quotes might be the way to fix it properly. So this: ${CMAKE_CXX_FLAGS_RELEASE} would become this: "${CMAKE_CXX_FLAGS_RELEASE}" - Hans On Sun, Jan 16, 2022 at 6:45 PM Father Horton <fatherhorton@gmail.com> wrote: > I'm running Linux 20.2 in VirtualBox. Building from source is producing > this: > > CMake Error at CMakeLists.txt:66 (string): > string sub-command REPLACE requires at least four arguments. > > > -- Eigen3: 3.3.7 > -- Found Boost: > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found > suitable version "1.71.0", minimum required is "1.36") found components: > filesystem system regex program_options > -- Boost: 1.71.0 > -- Harfbuzz: 2.6.4 > -- Fontconfig: > -- running openscad/cmake/Modules/FindGLIB2.cmake ... > -- saving pkg-config env > -- GLIB2_VERSION 2.64.6 > -- GLIB2_LIBRARY_DIRS > -- GLIB2_INCLUDE_DIRS: > -- /usr/include/glib-2.0 > -- /usr/lib/x86_64-linux-gnu/glib-2.0/include > -- GLIB2_LIBDIR /usr/lib/x86_64-linux-gnu > -- GLIB2_LIBRARIES: > -- /usr/lib/x86_64-linux-gnu/libglib-2.0.so > -- restoring pkg-config env > -- Glib: 2.64.6 > -- OpenCSG: > -- GLEW_INCLUDE_DIR: /usr/include > -- GLEW_LIBRARY: /usr/lib/x86_64-linux-gnu/libGLEW.so > -- OpenGL: > /usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so > -- Using header-only CGAL > -- Targetting Unix Makefiles > -- Using /usr/bin/c++ compiler. > -- Found Boost: > /usr/lib/x86_64-linux-gnu/cmake/Boost-1.71.0/BoostConfig.cmake (found > suitable version "1.71.0", minimum required is "1.48") > -- Boost include dirs: /usr/include > -- Boost libraries: > -- Using gcc version 4 or later. Adding -frounding-math > -- CGAL: 5.00 > -- CGAL: Using target CGAL::CGAL CGAL::CGAL_Core > -- libzip: 1.5.1 > -- Freetype: 2.10.1 > -- LibXml2: 2.9.10 > -- HIDAPI: disabled > -- Cairo: 1.16.0 > -- Flex: 2.6.4 > -- Bison: 3.5.1 > -- lib3mf: 1.8.1 > -- Qt5: 5.12.8 > -- QScintilla: 2.11.2 > -- DBus input driver enabled > -- Qt5Gamepad input driver disabled as the Qt5Gamepad module could not be > found. > -- Offscreen OpenGL Context - using Unix GLX on X11 > -- > -- ==================================== > -- OpenSCAD Build Configuration Summary > -- ==================================== > -- > -- CMAKE_BUILD_TYPE: > -- CMAKE_PREFIX_PATH: > -- SUFFIX: > -- > -- Experimental Features: OFF > -- Snapshot build: OFF > -- Headless build: OFF > -- NULLGL build: OFF > -- Profiling/coverage: OFF > -- CSG node id-prefix: OFF > -- > -- lib3mf: API 1.x > -- > -- Input Drivers > -- - HID API Driver (disabled) > -- - Space Navigator Library Driver (disabled) > -- - Joystick Driver (enabled) > -- - DBus Remote Driver (enabled) > -- > -- DEFINES = > _REENTRANT;UNICODE;_UNICODE;STACKSIZE=8388608;EIGEN_DONT_ALIGN;ENABLE_OPENCSG;ENABLE_CGAL;CGAL_DEBUG;ENABLE_LIBZIP;ENABLE_CAIRO;USE_QOPENGLWIDGET;USE_SCINTILLA_EDITOR;ENABLE_MDI;ENABLE_DBUS;OPENSCAD_VERSION=2022.01.16;OPENSCAD_SHORTVERSION=2022.01.16;OPENSCAD_YEAR=2022;OPENSCAD_MONTH=1;OPENSCAD_DAY=16;ENABLE_JOYSTICK > -- > -- ImageMagick convert executable found: /usr/bin/convert > -- creating CTestCustom.cmake > -- Configuring incomplete, errors occurred! > > > ------------------------------ > What do I do now? > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
TP
Torsten Paul
Mon, Jan 17, 2022 9:00 AM

On 17.01.22 09:50, Hans L wrote:

On previous versions of cmake the default optimzation level
for Release builds was -O3, but maybe that has changed recently.

With qmake now retired, maybe we should just remove that and
go with the default cmake setup?

ciao,
Torsten.

On 17.01.22 09:50, Hans L wrote: > On previous versions of cmake the default optimzation level > for Release builds was -O3, but maybe that has changed recently. With qmake now retired, maybe we should just remove that and go with the default cmake setup? ciao, Torsten.
FH
Father Horton
Mon, Jan 17, 2022 5:19 PM

cmake 3.16.3

I commented out lines 64 and 66 and it builds with no problem. Thanks!

On Mon, Jan 17, 2022 at 3:01 AM Torsten Paul Torsten.Paul@gmx.de wrote:

On 17.01.22 09:50, Hans L wrote:

On previous versions of cmake the default optimzation level
for Release builds was -O3, but maybe that has changed recently.

With qmake now retired, maybe we should just remove that and
go with the default cmake setup?

ciao,
Torsten.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

cmake 3.16.3 I commented out lines 64 and 66 and it builds with no problem. Thanks! On Mon, Jan 17, 2022 at 3:01 AM Torsten Paul <Torsten.Paul@gmx.de> wrote: > On 17.01.22 09:50, Hans L wrote: > > On previous versions of cmake the default optimzation level > > for Release builds was -O3, but maybe that has changed recently. > > With qmake now retired, maybe we should just remove that and > go with the default cmake setup? > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >