discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Compile OpenSCAD on Windows?

M
MichaelAtOz
Mon, Dec 15, 2014 7:18 AM

The ghost of Christmas, you must have been naughty this year, or nice if you
wished for a SSD.


Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/

View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10543.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

The ghost of Christmas, you must have been naughty this year, or nice if you wished for a SSD. ----- Unless specifically shown otherwise above, my contribution is in the Public Domain; To the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. This work is published globally via the internet. :) Inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10543.html Sent from the OpenSCAD mailing list archive at Nabble.com.
S
Scalpel78
Tue, Dec 16, 2014 10:44 PM

Following tp3's description I've come to compiling OpenCSG. When I run
mingw32-make.exe it fails with this:

main.cpp:38:21: fatal error: GL/glut.h: No such file or directory
#include <GL/glut.h>
^
compilation terminated.
Makefile:122: recipe for target 'main.o' failed
mingw32-make[1]: *** [main.o] Error 1
mingw32-make[1]: Leaving directory
'C:/msys64/home/Frode/OpenCSG-1.4.0/example'
Makefile:64: recipe for target 'sub-example-make_first' failed
mingw32-make: *** [sub-example-make_first] Error 2

Am I missing a prerequisite?

--
View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10567.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Following tp3's description I've come to compiling OpenCSG. When I run mingw32-make.exe it fails with this: main.cpp:38:21: fatal error: GL/glut.h: No such file or directory #include <GL/glut.h> ^ compilation terminated. Makefile:122: recipe for target 'main.o' failed mingw32-make[1]: *** [main.o] Error 1 mingw32-make[1]: Leaving directory 'C:/msys64/home/Frode/OpenCSG-1.4.0/example' Makefile:64: recipe for target 'sub-example-make_first' failed mingw32-make: *** [sub-example-make_first] Error 2 Am I missing a prerequisite? -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10567.html Sent from the OpenSCAD mailing list archive at Nabble.com.
S
Scalpel78
Wed, Dec 17, 2014 6:17 PM

I got one step further after manually changing the files mentioned in that
.patch file.

Torsten, I don't quite understand what to do with the following. Could you
clarify what you mean here?

tp3 wrote

All that needs to the respective qmake files... but here it is just
hardcoded
in openscad.pro... nothing that should go into any documentation.

win* {
FLEXSOURCES = src/lexer.l

  • BISONSOURCES = src/parser.y
  • BISONSOURCES = src\parser.y
  • QMAKE_CXXFLAGS += -DNOGDI -DGLEW_STATIC -DOPENSCAD_QTGUI
    -Wa,--hash-size=2048 -O2
  • QMAKE_CXXFLAGS += -I/c/msys64/mingw64/include
  • QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/eigen3"
  • QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/freetype2"
  • QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/harfbuzz"
  • QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/glib-2.0"
  • QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/lib/glib-2.0/include"
  • QMAKE_LFLAGS += -I/mingw64/lib
  • LIBS += -lintl -lglib-2.0 -lCGAL -lglew32 -lfontconfig -lfreetype
    -lharfbuzz -lmpfr -lgmp
    } else {

Add boost libs

 isEmpty(BOOST_LINK_FLAGS):win* {
  • BOOST_LINK_FLAGS = -llibboost_thread-vc90-mt-s-1_46_1
    -llibboost_program_options-vc90-mt-s-1_46_1
    -llibboost_filesystem-vc90-mt-s-1_46_1 -llibboost_system-vc90-mt-s-1_46_1
    -llibboost_regex-vc90-mt-s-1_46_1
  • DEFINES += BOOST_STATIC
  • DEFINES += BOOST_THREAD_USE_LIB
  • DEFINES += Boost_USE_STATIC_LIBS
  • #BOOST_LINK_FLAGS = -llibboost_thread-vc90-mt-s-1_46_1
    -llibboost_program_options-vc90-mt-s-1_46_1
    -llibboost_filesystem-vc90-mt-s-1_46_1 -llibboost_system-vc90-mt-s-1_46_1
    -llibboost_regex-vc90-mt-s-1_46_1
  • BOOST_LINK_FLAGS = -lboost_thread-mt -lboost_program_options-mt
    -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt
    }

Comment out one line in glew.pri

win32:LIBS += -lglew32s

Comment out two lines in cgal.pri

win*: QMAKE_INCDIR += $$CGAL_DIR/auxiliary/gmp/include

LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc110-mt-gd

--
View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10589.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I got one step further after manually changing the files mentioned in that .patch file. Torsten, I don't quite understand what to do with the following. Could you clarify what you mean here? tp3 wrote > > All that needs to the respective qmake files... but here it is just > hardcoded > in openscad.pro... nothing that should go into any documentation. > > win* { > FLEXSOURCES = src/lexer.l > - BISONSOURCES = src/parser.y > + BISONSOURCES = src\\parser.y > + QMAKE_CXXFLAGS += -DNOGDI -DGLEW_STATIC -DOPENSCAD_QTGUI > -Wa,--hash-size=2048 -O2 > + QMAKE_CXXFLAGS += -I/c/msys64/mingw64/include > + QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/eigen3" > + QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/freetype2" > + QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/harfbuzz" > + QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/include/glib-2.0" > + QMAKE_CXXFLAGS += -I"c:/msys64/mingw64/lib/glib-2.0/include" > + QMAKE_LFLAGS += -I/mingw64/lib > + LIBS += -lintl -lglib-2.0 -lCGAL -lglew32 -lfontconfig -lfreetype > -lharfbuzz -lmpfr -lgmp > } else { > > Add boost libs > > isEmpty(BOOST_LINK_FLAGS):win* { > - BOOST_LINK_FLAGS = -llibboost_thread-vc90-mt-s-1_46_1 > -llibboost_program_options-vc90-mt-s-1_46_1 > -llibboost_filesystem-vc90-mt-s-1_46_1 -llibboost_system-vc90-mt-s-1_46_1 > -llibboost_regex-vc90-mt-s-1_46_1 > + DEFINES += BOOST_STATIC > + DEFINES += BOOST_THREAD_USE_LIB > + DEFINES += Boost_USE_STATIC_LIBS > + #BOOST_LINK_FLAGS = -llibboost_thread-vc90-mt-s-1_46_1 > -llibboost_program_options-vc90-mt-s-1_46_1 > -llibboost_filesystem-vc90-mt-s-1_46_1 -llibboost_system-vc90-mt-s-1_46_1 > -llibboost_regex-vc90-mt-s-1_46_1 > + BOOST_LINK_FLAGS = -lboost_thread-mt -lboost_program_options-mt > -lboost_filesystem-mt -lboost_system-mt -lboost_regex-mt > } > > Comment out one line in glew.pri > > # win32:LIBS += -lglew32s > > Comment out two lines in cgal.pri > > # win*: QMAKE_INCDIR += $$CGAL_DIR/auxiliary/gmp/include > > # LIBS += $$CGAL_DIR/auxiliary/gmp/lib/libmpfr-4.lib -lCGAL-vc110-mt-gd -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10589.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Wed, Dec 17, 2014 6:25 PM

On 12/17/2014 07:17 PM, Scalpel78 wrote:

I got one step further after manually changing the files mentioned in that
.patch file.

Hmm, right, I guess I missed the OpenCSG build script modification in my
log.

Torsten, I don't quite understand what to do with the following. Could you
clarify what you mean here?

You mean the changes to the qmake files?

It's always mentioning the file, e.g. openscad.pro (main qmake file) or
glew.pri/boost.pri/... (imported by openscad.pro).

Essentially remove the lines starting with "-" and add those with "+".
It's basically a diff of the OpenSCAD directory after doing the changes
against the original github source.

ciao,
Torsten.

On 12/17/2014 07:17 PM, Scalpel78 wrote: > I got one step further after manually changing the files mentioned in that > .patch file. > Hmm, right, I guess I missed the OpenCSG build script modification in my log. > Torsten, I don't quite understand what to do with the following. Could you > clarify what you mean here? > You mean the changes to the qmake files? It's always mentioning the file, e.g. openscad.pro (main qmake file) or glew.pri/boost.pri/... (imported by openscad.pro). Essentially remove the lines starting with "-" and add those with "+". It's basically a diff of the OpenSCAD directory after doing the changes against the original github source. ciao, Torsten.
S
Scalpel78
Wed, Dec 17, 2014 8:46 PM

Right, got it.

I've made all the changes, and have opened the project in Qt Creator. When
building I get:

21:42:05: Running steps for project openscad...
21:42:05: Configuration unchanged, skipping qmake step.
21:42:05: Starting: "C:\msys64\mingw64\bin\mingw32-make.exe"
C:/msys64/mingw64/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory
'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug'
flex -P lexer -o../openscad/src/lexer.lexer.cpp ../openscad/src/lexer.l
flex: can't open lexer
Makefile.Debug:562: recipe for target '../openscad/src/lexer.lexer.cpp'
failed
mingw32-make[1]: *** [../openscad/src/lexer.lexer.cpp] Error 1
mingw32-make[1]: Leaving directory
'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug'
Makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
21:42:06: The process "C:\msys64\mingw64\bin\mingw32-make.exe" exited with
code 2.
Error while building/deploying project openscad (kit: Desktop Qt 5.3
MinGW-w64 64bit (MSYS2))
When executing step "Make"
21:42:06: Elapsed time: 00:01.

--
View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10602.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Right, got it. I've made all the changes, and have opened the project in Qt Creator. When building I get: 21:42:05: Running steps for project openscad... 21:42:05: Configuration unchanged, skipping qmake step. 21:42:05: Starting: "C:\msys64\mingw64\bin\mingw32-make.exe" C:/msys64/mingw64/bin/mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory 'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug' flex -P lexer -o../openscad/src/lexer.lexer.cpp ../openscad/src/lexer.l flex: can't open lexer Makefile.Debug:562: recipe for target '../openscad/src/lexer.lexer.cpp' failed mingw32-make[1]: *** [../openscad/src/lexer.lexer.cpp] Error 1 mingw32-make[1]: Leaving directory 'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug' Makefile:34: recipe for target 'debug' failed mingw32-make: *** [debug] Error 2 21:42:06: The process "C:\msys64\mingw64\bin\mingw32-make.exe" exited with code 2. Error while building/deploying project openscad (kit: Desktop Qt 5.3 MinGW-w64 64bit (MSYS2)) When executing step "Make" 21:42:06: Elapsed time: 00:01. -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10602.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Wed, Dec 17, 2014 8:52 PM

On 12/17/2014 09:46 PM, Scalpel78 wrote:

mingw32-make[1]: Entering directory
'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug'
flex -P lexer -o../openscad/src/lexer.lexer.cpp ../openscad/src/lexer.l
flex: can't open lexer
Makefile.Debug:562: recipe for target '../openscad/src/lexer.lexer.cpp'
failed

That looks like it's not finding the file as it's doing an out-of-source
build (which I think is the default).

What's the project setting "General -> Shadow build"?

That should just point to the folder with the OpenSCAD source.

ciao,
Torsten.

On 12/17/2014 09:46 PM, Scalpel78 wrote: > mingw32-make[1]: Entering directory > 'C:/openscad/build-openscad-Desktop_Qt_5_3_MinGW_w64_64bit_MSYS2-Debug' > flex -P lexer -o../openscad/src/lexer.lexer.cpp ../openscad/src/lexer.l > flex: can't open lexer > Makefile.Debug:562: recipe for target '../openscad/src/lexer.lexer.cpp' > failed > That looks like it's not finding the file as it's doing an out-of-source build (which I think is the default). What's the project setting "General -> Shadow build"? That should just point to the folder with the OpenSCAD source. ciao, Torsten.
S
Scalpel78
Wed, Dec 17, 2014 9:40 PM

The sourcecode is downloaded from GIT into C:\openscad\openscad

The Shadow build checkbox is on, and I've tried changing the path to both
C:\openscad\openscad and C:\openscad\openscad\src, but on both cases it
fails on "flex: can't open lexer".

--
View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10604.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

The sourcecode is downloaded from GIT into C:\openscad\openscad The Shadow build checkbox is on, and I've tried changing the path to both C:\openscad\openscad and C:\openscad\openscad\src, but on both cases it fails on "flex: can't open lexer". -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10604.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Thu, Dec 18, 2014 5:04 PM

Hi,

Is the Windows build page (https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows) updated with your latest fixes?

-Marius

Hi, Is the Windows build page (https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows) updated with your latest fixes? -Marius
S
Scalpel78
Thu, Dec 18, 2014 6:02 PM

Yes, that page is up-to-date with the setup I have used.

--
View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10611.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Yes, that page is up-to-date with the setup I have used. -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10611.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
mx
Thu, Dec 18, 2014 6:35 PM

What flex version do you have installed?


lazy.scad - http://www.thingiverse.com/thing:512443

View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10612.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

What flex version do you have installed? ----- lazy.scad - http://www.thingiverse.com/thing:512443 -- View this message in context: http://forum.openscad.org/Compile-OpenSCAD-on-Windows-tp10516p10612.html Sent from the OpenSCAD mailing list archive at Nabble.com.