LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-03-2016, 01:09 AM   #1
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Cross compiling under Slackware using mingw-w64


I have been cross compiling for Windows using mingw-w64 under another Linux distro (which has a conveniently packaged mingw-w64 and all the associated utilities I need).

Has any Slackware user been using mingw-w64 and also has a slackbuild(s) for it?

Last edited by andrew.46; 06-03-2016 at 04:22 AM.
 
Old 06-03-2016, 05:22 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Perhaps you find what you need here: http://cgit.notk.org/gitolite/win-builds/mingw.git/
 
1 members found this post helpful.
Old 06-03-2016, 05:54 AM   #3
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by andrew.46 View Post
I have been cross compiling for Windows using mingw-w64 under another Linux distro (which has a conveniently packaged mingw-w64 and all the associated utilities I need).

Has any Slackware user been using mingw-w64 and also has a slackbuild(s) for it?
Andrew.46 --

I've not had to build a mingw environment for a few years now ( 2011 / 2012 ) .

We used to use msys + mingw to run our ( sh + sed + awk + perl + c ) Data Conversion Scripts for ALL of our Customers running our Payroll System on Windows.

Then we realized a few years ago that it more productive to provide a Plug-n-Play 'Linux Appliance' to do the task, especially after MS introduced the Windows 7+ security model.

The Data Conversions run 15-20 times faster on an Atom / Celeron box running Linux than they do on a Windows Box running the fastest Xeon ( Windows does not do processes very efficiently ).

And then we would occasionally suffer mysterious breakage the day after Patch Tuesday Windows Updates were applied ...

Anyhow ... there are still a few 'hold outs' who won't allow Linux on their LANs ... ???

I've still got a mingw cross-compiler environment on my old 13.37 laptop and I'll have to eventually get around to setting it up on my new laptop running 14.2 / current.

My mingw / msys build is old -- circa 2012 ...

And in 2012, I hadn't yet realized the value investing just a little more effort to build 'extra' software on my Slackware Boxes with SlackBuild scripts.

So the old environment was generated via good-ole ( configure ( prefix=/usr/local/ ) ; make ; make test ; make install ; ) sequences.

This time I will definitely take the time to either use existing SlackBuilds or I'll work on rolling my own SlackBuild Scripts.

Arch has a very complete mingw-64 set( it looks like the most complete set of all ).

http://mingw-w64.org/doku.php/download

And the Arch team usually provide a good starting place for building from source.

I won't get around to this until later this summer and if mingw-64 + msys2 Slackbuilds don't yet exist, I would be happy to work with other users on a system of mingw-64 / msys2 SlackBuilds and then donate whatever ( I / we ) come up with to the SBo Team ( if they want them ).

-- kjh
 
Old 06-03-2016, 05:57 AM   #4
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Quote:
Originally Posted by Alien Bob View Post
Perhaps you find what you need here: http://cgit.notk.org/gitolite/win-builds/mingw.git/
Thank you Alien Bob !

-- kjh
 
Old 06-03-2016, 10:15 AM   #5
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by andrew.46 View Post
I have been cross compiling for Windows using mingw-w64 under another Linux distro (which has a conveniently packaged mingw-w64 and all the associated utilities I need).

Has any Slackware user been using mingw-w64 and also has a slackbuild(s) for it?
Yes I compile all my frameworks for linux AND windows using MXE... It's the best mingw cross compilation system in my POV:

http://mxe.cc/

Simply clone the repo somewhere, make, wait some hours ...

Seriously, you can just:

Code:
$ make gcc
$ make <library-you-want>
After that, just read the doc, but it's classical cross compilation...
 
3 members found this post helpful.
Old 06-03-2016, 08:39 PM   #6
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Original Poster
Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by Alien Bob View Post
Perhaps you find what you need here: http://cgit.notk.org/gitolite/win-builds/mingw.git/
Thanks for the link, this certainly provides a start at least and plenty of work for a rainy day. I had no idea until I looked a little closer how complex it is to package a cross compiler...
 
Old 06-03-2016, 08:43 PM   #7
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Original Poster
Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by NoStressHQ View Post
Yes I compile all my frameworks for linux AND windows using MXE...
Giving this a try this morning, thanks
 
Old 06-03-2016, 10:23 PM   #8
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Original Poster
Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Another option that I am also looking at is a pretty amazing script written by the gentleman who produces FFmpeg builds for Windows. He has been good enough to put the licensed script for his mingw toolchain build online:

MinGW-w64 Build Script 3.6.7
https://ffmpeg.zeranoe.com/blog/?p=414

Last edited by andrew.46; 06-03-2016 at 10:28 PM.
 
Old 06-03-2016, 10:59 PM   #9
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by andrew.46 View Post
Another option that I am also looking at is a pretty amazing script written by the gentleman who produces FFmpeg builds for Windows. He has been good enough to put the licensed script for his mingw toolchain build online:

MinGW-w64 Build Script 3.6.7
https://ffmpeg.zeranoe.com/blog/?p=414
I haven't tried(used) it myself but mxe have ffmpeg already: http://mxe.cc/#packages...

So you should just have to do in your 'mxe' local clone:

Code:
some/where/mingw-mxe $ make ffmpeg
That's it.
 
Old 06-04-2016, 01:22 AM   #10
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Original Poster
Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by NoStressHQ View Post
I haven't tried(used) it myself but mxe have ffmpeg already: http://mxe.cc/#packages...
Actually this script just builds mingw-w64 toolchain not FFmpeg itself, but I could not get it to complete with various errors on different versions of gcc, binutils and friends...
 
Old 06-04-2016, 01:32 AM   #11
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by andrew.46 View Post
Actually this script just builds mingw-w64 toolchain not FFmpeg itself, but I could not get it to complete with various errors on different versions of gcc, binutils and friends...
Sorry but which script are you talking about ? Mxe doesn't build "just" the toolchain, it compiles the whole stuff, toolchain + libraries + applications which are provided (so ffmpeg). MXE build all... And building something not in the provided packages is straight forward, and you got already the cross-compiler, and most common libraries.

And nothing else is required on Slackware (and I guess it's valid for "any" unix like system with gcc and gnu/make). Building ffmpeg is just a matter of:

Code:
some/where $ git clone https://github.com/mxe/mxe.git
some/where $ cd mxe
some/where/mxe $ make ffmpeg
And that's really all... Nothing more is required...
 
2 members found this post helpful.
Old 06-04-2016, 01:44 AM   #12
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Original Poster
Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
My apologies for a bad quote, the script I meant is:

MinGW-w64 Build Script 3.6.7
https://ffmpeg.zeranoe.com/blog/?p=414

which builds the mingw-w64 toolchain. I have downloaded mxe now and have been experimenting with a few builds, thanks for the steer towards this
 
Old 06-04-2016, 01:56 AM   #13
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
You're welcome, let me know if you have any problem... (Although I go to sleep now ).

Cheers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mingw cross compile gfortran for windows uchiha_itachi Linux - Newbie 2 12-14-2014 06:52 PM
[SOLVED] ld.exe error with MinGW-w64 and Windows 7 wombatman Programming 8 09-11-2013 10:31 AM
cross-compiling with MinGW in Debian Linux qrange Linux - Software 1 01-14-2011 11:28 PM
Fedora style MinGW Cross Compile Suite for Slackware? Gavin Harper Slackware 0 11-06-2010 10:03 AM
minGW: cross platform using g77? shengchieh Programming 4 01-03-2005 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration