discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Windows cross compilation

R
royasutton
Sat, Mar 4, 2017 11:14 PM

If there is a known path to compile OpenSCAD to run under Cygwin, I would be
very interested.  More specifically, I mean compiled and linked with the
cygwin1.dll using the X11 and POSIX file i/o.

Why? because it is much easier to do build scripting under Unix-like
environments. I currently make use of the cross-compiled Windows binary, but
it is not  deal with file permission very robustly.

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

If there is a known path to compile OpenSCAD to run under Cygwin, I would be very interested. More specifically, I mean compiled and linked with the cygwin1.dll using the X11 and POSIX file i/o. Why? because it is much easier to do build scripting under Unix-like environments. I currently make use of the cross-compiled Windows binary, but it is not deal with file permission very robustly. -- View this message in context: http://forum.openscad.org/Windows-cross-compilation-tp20413p20750.html Sent from the OpenSCAD mailing list archive at Nabble.com.
MK
Marius Kintel
Sun, Mar 5, 2017 1:32 AM

On Mar 4, 2017, at 18:14, royasutton roy_sutton@hotmail.com wrote:

If there is a known path to compile OpenSCAD to run under Cygwin, I would be
very interested.  More specifically, I mean compiled and linked with the
cygwin1.dll using the X11 and POSIX file i/o.

I don’t know if anyone has attempted that. Most people wanting smth. like this tend to simply just do it under Linux :)

-Marius

> On Mar 4, 2017, at 18:14, royasutton <roy_sutton@hotmail.com> wrote: > > If there is a known path to compile OpenSCAD to run under Cygwin, I would be > very interested. More specifically, I mean compiled and linked with the > cygwin1.dll using the X11 and POSIX file i/o. > I don’t know if anyone has attempted that. Most people wanting smth. like this tend to simply just do it under Linux :) -Marius
R
royasutton
Sun, Mar 5, 2017 9:32 AM

At some point a user will want a system-level design approach and suitable
design flow. Although I prefer Unix-based platforms for development,  I have
no issue with others who, for whatever reason, are using a Windows-based
platform. Cygwin allows those users to leverage the mature tool chains of
Unix-based platforms. It sounds like a good fit to me...

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

At some point a user will want a system-level design approach and suitable design flow. Although I prefer Unix-based platforms for development, I have no issue with others who, for whatever reason, are using a Windows-based platform. Cygwin allows those users to leverage the mature tool chains of Unix-based platforms. It sounds like a good fit to me... -- View this message in context: http://forum.openscad.org/Windows-cross-compilation-tp20413p20761.html Sent from the OpenSCAD mailing list archive at Nabble.com.
NH
nop head
Sun, Mar 5, 2017 9:49 AM

Does anybody know how to make the .exe built under Cygwin statically link
like the official Windows binary? It seems odd to me that the MSYS2 version
doesn't build the same result as the cross compiled version. Is it because
the MSYS2 packages are dynamically linked?

On 5 March 2017 at 09:32, royasutton roy_sutton@hotmail.com wrote:

At some point a user will want a system-level design approach and suitable
design flow. Although I prefer Unix-based platforms for development,  I
have
no issue with others who, for whatever reason, are using a Windows-based
platform. Cygwin allows those users to leverage the mature tool chains of
Unix-based platforms. It sounds like a good fit to me...

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


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Does anybody know how to make the .exe built under Cygwin statically link like the official Windows binary? It seems odd to me that the MSYS2 version doesn't build the same result as the cross compiled version. Is it because the MSYS2 packages are dynamically linked? On 5 March 2017 at 09:32, royasutton <roy_sutton@hotmail.com> wrote: > At some point a user will want a system-level design approach and suitable > design flow. Although I prefer Unix-based platforms for development, I > have > no issue with others who, for whatever reason, are using a Windows-based > platform. Cygwin allows those users to leverage the mature tool chains of > Unix-based platforms. It sounds like a good fit to me... > > > > -- > View this message in context: http://forum.openscad.org/ > Windows-cross-compilation-tp20413p20761.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
TP
Torsten Paul
Sun, Mar 5, 2017 10:28 AM

On 03/05/2017 10:49 AM, nop head wrote:

Does anybody know how to make the .exe built under Cygwin statically
link like the official Windows binary? It seems odd to me that the
MSYS2 version doesn't build the same result as the cross compiled
version. Is it because the MSYS2 packages are dynamically linked?

MSYS2 pretty much replicates a Unix shell environment so the build
mostly does similar setup as on a Linux system and uses the dynamic
libraries provided by the "Distribution" (= MSYS2).
All that minus some glitches in the OpenSCAD build system caused
by the overlap of both MXE and MSYS2 using MinGW.

Don put a lot of effort into the MXE setup which can support
compiling static libraries when selected. This works as MXE
is more a build environment and not a binary distribution of
applications to run.

I am building OpenScad on Win7 using the instructions here:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows.
The resulting .exe runs on Windows via the MSYS2 shell but I
can't get it to run directly from Windows. So I am not sure
if it is a real Window's build or not.

That's probably due to all the internal path references and such
stuff. Otherwise MinGW should generate a native binary without
any references to a runtime Unix environment like cygwin.

I'm not sure there's a simple way to package the MinGW binary
to run fully standalone.

ciao,
Torsten.

On 03/05/2017 10:49 AM, nop head wrote: > Does anybody know how to make the .exe built under Cygwin statically > link like the official Windows binary? It seems odd to me that the > MSYS2 version doesn't build the same result as the cross compiled > version. Is it because the MSYS2 packages are dynamically linked? > MSYS2 pretty much replicates a Unix shell environment so the build mostly does similar setup as on a Linux system and uses the dynamic libraries provided by the "Distribution" (= MSYS2). All that minus some glitches in the OpenSCAD build system caused by the overlap of both MXE and MSYS2 using MinGW. Don put a lot of effort into the MXE setup which can support compiling static libraries when selected. This works as MXE is more a build environment and not a binary distribution of applications to run. > I am building OpenScad on Win7 using the instructions here: > https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Microsoft_Windows. > The resulting .exe runs on Windows via the MSYS2 shell but I > can't get it to run directly from Windows. So I am not sure > if it is a real Window's build or not. > That's probably due to all the internal path references and such stuff. Otherwise MinGW should generate a native binary without any references to a runtime Unix environment like cygwin. I'm not sure there's a simple way to package the MinGW binary to run fully standalone. ciao, Torsten.
B
buttim
Sun, Mar 5, 2017 10:42 AM

Really glad to see so many people interested by this issue. Anybody
volunteering to check if he/she finds the same problems while cross
compiling?

Il 05/mar/2017 11:29, "tp3 [via OpenSCAD]" <
ml-node+s1091067n20763h28@n5.nabble.com> ha scritto:

On 03/05/2017 10:49 AM, nop head wrote:

Does anybody know how to make the .exe built under Cygwin statically
link like the official Windows binary? It seems odd to me that the
MSYS2 version doesn't build the same result as the cross compiled
version. Is it because the MSYS2 packages are dynamically linked?

MSYS2 pretty much replicates a Unix shell environment so the build
mostly does similar setup as on a Linux system and uses the dynamic
libraries provided by the "Distribution" (= MSYS2).
All that minus some glitches in the OpenSCAD build system caused
by the overlap of both MXE and MSYS2 using MinGW.

Don put a lot of effort into the MXE setup which can support
compiling static libraries when selected. This works as MXE
is more a build environment and not a binary distribution of
applications to run.

I am building OpenScad on Win7 using the instructions here:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_

on_Microsoft_Windows.

The resulting .exe runs on Windows via the MSYS2 shell but I
can't get it to run directly from Windows. So I am not sure
if it is a real Window's build or not.

That's probably due to all the internal path references and such
stuff. Otherwise MinGW should generate a native binary without
any references to a runtime Unix environment like cygwin.

I'm not sure there's a simple way to package the MinGW binary
to run fully standalone.

ciao,
Torsten.


OpenSCAD mailing list
[hidden email] http:///user/SendEmail.jtp?type=node&node=20763&i=0
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten


If you reply to this email, your message will be added to the discussion
below:
http://forum.openscad.org/Windows-cross-compilation-tp20413p20763.html
To unsubscribe from Windows cross compilation, click here
http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=20413&code=bWF1cml6aW8uYnV0dGlAZ21haWwuY29tfDIwNDEzfDE4OTg0NTUyNTk=
.
NAML
http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml

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

Really glad to see so many people interested by this issue. Anybody volunteering to check if he/she finds the same problems while cross compiling? Il 05/mar/2017 11:29, "tp3 [via OpenSCAD]" < ml-node+s1091067n20763h28@n5.nabble.com> ha scritto: > On 03/05/2017 10:49 AM, nop head wrote: > > Does anybody know how to make the .exe built under Cygwin statically > > link like the official Windows binary? It seems odd to me that the > > MSYS2 version doesn't build the same result as the cross compiled > > version. Is it because the MSYS2 packages are dynamically linked? > > > MSYS2 pretty much replicates a Unix shell environment so the build > mostly does similar setup as on a Linux system and uses the dynamic > libraries provided by the "Distribution" (= MSYS2). > All that minus some glitches in the OpenSCAD build system caused > by the overlap of both MXE and MSYS2 using MinGW. > > Don put a lot of effort into the MXE setup which can support > compiling static libraries when selected. This works as MXE > is more a build environment and not a binary distribution of > applications to run. > > > I am building OpenScad on Win7 using the instructions here: > > https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_ > on_Microsoft_Windows. > > The resulting .exe runs on Windows via the MSYS2 shell but I > > can't get it to run directly from Windows. So I am not sure > > if it is a real Window's build or not. > > > That's probably due to all the internal path references and such > stuff. Otherwise MinGW should generate a native binary without > any references to a runtime Unix environment like cygwin. > > I'm not sure there's a simple way to package the MinGW binary > to run fully standalone. > > ciao, > Torsten. > > > _______________________________________________ > OpenSCAD mailing list > [hidden email] <http:///user/SendEmail.jtp?type=node&node=20763&i=0> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > -- Torsten > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > http://forum.openscad.org/Windows-cross-compilation-tp20413p20763.html > To unsubscribe from Windows cross compilation, click here > <http://forum.openscad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=20413&code=bWF1cml6aW8uYnV0dGlAZ21haWwuY29tfDIwNDEzfDE4OTg0NTUyNTk=> > . > NAML > <http://forum.openscad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://forum.openscad.org/Windows-cross-compilation-tp20413p20764.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Sun, Mar 5, 2017 10:43 AM

On 03/05/2017 10:32 AM, royasutton wrote:

At some point a user will want a system-level design approach and suitable
design flow. Although I prefer Unix-based platforms for development,  I have
no issue with others who, for whatever reason, are using a Windows-based
platform. Cygwin allows those users to leverage the mature tool chains of
Unix-based platforms. It sounds like a good fit to me...

MSYS2 provides all that without the extra runtime emulation layer.
I don't see how that matters much to the user. The only benefit
seems to be at development time as it might be possible to take
Unix code and compile without specific Windows support where MinGW
needs some kind of Windows support in the application itself.

ciao,
Torsten.

On 03/05/2017 10:32 AM, royasutton wrote: > At some point a user will want a system-level design approach and suitable > design flow. Although I prefer Unix-based platforms for development, I have > no issue with others who, for whatever reason, are using a Windows-based > platform. Cygwin allows those users to leverage the mature tool chains of > Unix-based platforms. It sounds like a good fit to me... > MSYS2 provides all that without the extra runtime emulation layer. I don't see how that matters much to the user. The only benefit seems to be at development time as it might be possible to take Unix code and compile without specific Windows support where MinGW needs some kind of Windows support in the application itself. ciao, Torsten.
R
royasutton
Sun, Mar 5, 2017 11:25 AM

At some point a user will want a system-level design approach and suitable
design flow. Although I prefer Unix-based platforms for development,  I
have

MSYS2 provides all that without the extra runtime emulation layer.
I don't see how that matters much to the user. The only benefit
seems to be at development time as it might be possible to take
Unix code and compile without specific Windows support where MinGW
needs some kind of Windows support in the application itself.

The system-level design referred to is regarding using OpenSCAD, not
compiling it... IE: now that one has an OpenSCAD executable how to use it as
a tool in a design flow on collections of *.scad design files.

...not complaining about the existing windows compilation solution... and
kudos to any and all who contributed to that effort! Just checking if anyone
had worked on a Cygwin compile as it sounded like someone had.

Cheers,
Roy

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

>> At some point a user will want a system-level design approach and suitable >> design flow. Although I prefer Unix-based platforms for development, I >> have > MSYS2 provides all that without the extra runtime emulation layer. > I don't see how that matters much to the user. The only benefit > seems to be at development time as it might be possible to take > Unix code and compile without specific Windows support where MinGW > needs some kind of Windows support in the application itself. The system-level design referred to is regarding *using* OpenSCAD, not compiling it... IE: now that one has an OpenSCAD executable how to use it as a tool in a design flow on collections of *.scad design files. ...not complaining about the existing windows compilation solution... and kudos to any and all who contributed to that effort! Just checking if anyone had worked on a Cygwin compile as it sounded like someone had. Cheers, Roy -- View this message in context: http://forum.openscad.org/Windows-cross-compilation-tp20413p20767.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
royasutton
Sun, Mar 5, 2017 11:36 AM

Does anybody know how to make the .exe built under Cygwin statically link
like the official Windows binary? It seems odd to me that the MSYS2
version

I am no Cygwin expert, but from what I understand, it is  not possible
https://cygwin.com/faq/faq.html#faq.programming.static-linking  to do so.
It appears to be an intentional limitation by design.

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

> Does anybody know how to make the .exe built under Cygwin statically link > like the official Windows binary? It seems odd to me that the MSYS2 > version I am no Cygwin expert, but from what I understand, it is not possible <https://cygwin.com/faq/faq.html#faq.programming.static-linking> to do so. It appears to be an intentional limitation by design. -- View this message in context: http://forum.openscad.org/Windows-cross-compilation-tp20413p20768.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Sun, Mar 5, 2017 11:53 AM

On 03/05/2017 12:25 PM, royasutton wrote:

The system-level design referred to is regarding using OpenSCAD,
not compiling it... IE: now that one has an OpenSCAD executable
how to use it as a tool in a design flow on collections of *.scad
design files.

That was my point about. I don't see how it matters to the user
which libraries or compilation environments the OpenSCAD binary
was compiled from.

I'm not aware of any Cygwin work being done, and actually I don't
see much reason for this. It's likely to be a huge effort and
will also require someone who is really committed to also maintain
it in the future.
It might be easier trying to compile and package the MSYS2 binary
so it can run without MSYS2 installed (if that's possible, but I
think it should be).

What might be useful and was worked on by different people in the
past is a Visual Studio based build. That's also not a simple task,
mainly due to the libraries that need to be build and setup.
It's basically a chicken and egg issue.
The MSYS2 build is mainly a workaround to at least be able to
provide a solution for someone who wants to build directly on
Windows.

ciao,
Torsten.

On 03/05/2017 12:25 PM, royasutton wrote: > The system-level design referred to is regarding *using* OpenSCAD, > not compiling it... IE: now that one has an OpenSCAD executable > how to use it as a tool in a design flow on collections of *.scad > design files. > That was my point about. I don't see how it matters to the user which libraries or compilation environments the OpenSCAD binary was compiled from. I'm not aware of any Cygwin work being done, and actually I don't see much reason for this. It's likely to be a huge effort and will also require someone who is really committed to also maintain it in the future. It might be easier trying to compile and package the MSYS2 binary so it can run without MSYS2 installed (if that's possible, but I think it should be). What might be useful and was worked on by different people in the past is a Visual Studio based build. That's also not a simple task, mainly due to the libraries that need to be build and setup. It's basically a chicken and egg issue. The MSYS2 build is mainly a workaround to at least be able to provide a solution for someone who wants to build directly on Windows. ciao, Torsten.