Compiling msys make for compatibility with Mozilla's msys make - winapi

Running on Windows 7 with msys installed along with gcc and the source for GNU make 3.81.
In an msys bash shell I run ./confgure which enables both WINDOWS32 and HAVE_DOS_PATHS
Then running make produces an executable which reports 'This program built for i686-pc-mingw32'
If I then copy the resulting .exe into the /mozilla/build/msys/bin folder, make fails, claiming it cannot find files. The locally built version is ~2.3MB as compared to the ~153KB for the Mozilla version.
Can anyone tell me how the Mozilla crew builds their version of make for Windows?
Thanks.

Maybe you'll find the source to the mozillabuild package helpful.

Related

Compiling Ghostscript 9.10 using mingw

I am using msys2 Mingw (gcc 4.8.2 for i686 32-bit) for building Ghostscript 9.10. After running make, gs.exe was created successfully. Followed by that I ran "make so" for creating libgs library. Libgs.so, Libgs.so.9.10 were created which are of the same file size. But I found both of them to be PE executables. After renaming extension to .exe, they produced the same output as done by gs.exe. What I require is libgs.dll, libgs.a to be created, but instead "make so" creates libgs.so which is in fact a PE executable. I also tried using patch found on site:https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-ghostscript/mingw-build.patch, but still the output remains the same. Has anyone been successful in this? Kindly help me.
I presume if you follow the steps taken in the build script connected to the patch you linked, everything will work out fine. I think most of it is just to make it use the "system"'s 3rd party libraries instead of those in the GS source. I'd guess running the configure command would do.
Alternatively, you could just download the MSYS2 base system from here, and do a pacman -Syu mingw-w64-i686-ghostscript. It should download and install the binary package without you having to build it yourself.
If you really want to build it yourself, download the PKGBUILD and patch, and run makepkg from the aforementioned MSYS2 shell and have that build it for you.
Have just completed testing of gs 9.15 built executables using the a patch
MINGW-packages-master.zip from https://github.com/Alexpux/MINGW-packages
Without implementing the zlib patch and PKGBUILD and using a MINGW 4.7.3 32/64
without by ghostscript used libs installed.
They did not work as is while using msys1 pathe'd up ahead of Windoze.
I simply edited the the MINGW Build and 32/64 bit type in makefile in
and set them to =1 there. and as i built without GTK defined in ./configure
SOC_LOADER_PLAIN manually to gs.c
Check the makefile after ./configure ahead of make or make so though , , .
All went well except for the COMPILE_INITS
mkromfs build that failed so I had to set that to =0 and build without that
feature. For me personally preferred as one can patch the gs fonts and libs
much easier.
The builds run as charm with full cpu optimisers implemented
only disabling gcse and guess-branch-probability, easily outperforming
the binaries provided by http://www.ghostscript.com/ by all means.
HPC !

mingw make is displaying version and exiting

i'm trying to make fltk 1.3.x r9678 after using cmake to generate mingw makefiles. upon running make, windows version and copyright info are displayed instead of compiling fltk. i'm using the latest version of mingw
I just went through building FLTK 1.3.2 using MinGW and there was no need to create your own makefiles. Here are my notes with some comments in parenthesis:
Start Menu - All Programs - MinGW folder - MinGW shell (start MinGW
shell)
cd to fltk-1.3.2 (in the MinGW shell change directory to the root
folder of FLTK)
make clean (clean out previous bad build if any)
LDFLAGS="-static-libgcc -static-libstdc++" ./configure
--enable-threads --enable-localjpeg --enable-localpng --enable-localzlib (configure it to build for MinGW)
make
make install
Hope this helps others in the future.

use MinGW to create exe file in windows from GNU source package

the basic idea was, I wanted to generate the call graph in text format for several c files. After googling around for long time, i found cflow, which can deliver everything I want, but it is only runable in Linux or else. Then I began to search how to compile the cflow source files on the web to a exe file. I found MinGW which should be able to do the cross-platform compilation.
After installing the MinGW and the MSYS and running the usual commands "./configure; make; make install", I simply got an error that "mkdir" was not found. Actually. Actually I was wondering whether this is the correct way to compile the whole package.
Does anyone has an idea how I can build the cflow.exe correctly in Windows? If there is a tutorial or something like this, I will be very thankful.
Song
Solution
Please try this Github repository "MinGW + MSYS build of GNU cflow 1.4" (For Windows).
https://github.com/noahp/cflow-mingw
It contains already compiled "cflow.exe",and an instruction about how to build cflow using mingw and msys.
Test
System Environment:Win 8.1 (x64)
1.I tested the "cflow.exe" downloaded from the github repository , and amazingly it worked!
2.I followed the mingw compiling instruction,and it successfully compiled "cflow 1.5".
Command:
bash configure
make
I was able to do that today. I'm using cygwin, after installing gcc, binutils, make and after downloading the gnu cflow.tar.gz, it was as easy as ./configure ; make ; make install.

LLVM MinGW installation on Vista?

From llvm.org I've downloaded llvm-2.6-x86-mingw32.tar.bz2 into c:\llvm and llvm-gcc-4.2-2.6-x86-mingw32-tar.bz2 into c:\llvm-gcc as well as setup a desktop shortcut the following batch file in c:\llvm-gcc which attempts to setup an environment for compiling via the llvm-gcc command line too:
#echo off
color 0E
echo Configuring LLVM environment...
set LLVM_LIB_SEARCH_PATH=%~dp0lib
set PATH=c:\llvm;%~dp0bin;%PATH%
Unfortunately, this setup gives the following error when trying to compile a simple hello world program:
C:\CDev\sandbox>llvm-gcc -o hello.exe hello.c
llvm-gcc: CreateProcess: No such file or directory
I've briefly looked through the LLVM binaries and it appears that the MinGW-based Win32 API and runtime files are already included. I also tried adding the MinGW DLL to c:\llvm-gcc\bin to no avail.
What have I missed in setting up the binary LLVM environment and GCC-based front end on Vista?
Thanks, Jon
Because the GNU/MinGW assembler 'as' was required by 'llvm-gcc' to generate the obj file. The problem can be solved by using:
Install GNU/MinGW binutils, extract the as.exe into c:\llvm-gcc\bin
Install a full MinGW package, add %MinGW%\bin your %PATH%
#rwallace is correct that one needs to also install MinGW's binutils along with the LLVM binary download. I've updated the LLVM documentation appropriately at
http://llvm.org/docs/GettingStarted.html#installcf
As far as I can tell, the answer is that the MinGW distribution supplied by LLVM is not complete, in particular, it doesn't come with the 'binutils' programs.
The recommended solution seems to be to download and install MinGW yourself. However, the MinGW download page seems to be saying this requires 10 different packages to be downloaded and installed separately.
The solution I tried today was to use the MinGW that comes with Qt, which does come in a single package; thus far, that appears to work.
It seems like it is looking for the base MinGW installation in C:\MinGW. I just had this error today using gcc.exe in msys. To solve it, I created a symbolic link from c:\msys to c:\MinGW and everything worked.

How to install gcc-4.4 on cygwin?

I've installed cygwin environment on Windows.
There is gcc 4.3. How to install gcc 4.4 in this environment?
The alternative is to build one yourself, but it will be extremely slow on cygwin. If you are a Linux user, you can build a native compiler (which runs in cmd.exe on windows, and produces native win32 binaries) on Linux. It is much faster (order of magnitude faster in my experience).
Otherwise, mingw is a good solution, although in my experience, the binary from equation.com work better for gcc 4.4 (there is no official gcc 4.4 from MinGW yet)
If you don't need the cygwin environment for special reasons, I'd go for Mingw with the gcc 4.4. You can find builds on: http://www.tdragon.net/recentgcc/.
Reading the MinGW FAQ, reveals that its possible to pass requests to use the MinGW binaries instead of the ones shipped with Cygwin.
For those who would like to use the Cygwin environment for development, yet generate non-Cygwin-dependant executables, a much easier option to "-mno-cygwin" does exist. Simply install Cygwin and the MinGW distribution in separate directories (i.e. "C:\CYGWIN" and "C:\MINGW"), and make sure that the "/bin" subdirectory beneath your MinGW installation comes before Cygwin's "/bin" subdirectory in your PATH environment variable (i.e. "PATH=%PATH%;C:\MINGW\BIN;C:\CYGWIN\BIN"). This will allow you access to all the UNIX tools you want, while ensuring that the instance of GCC used is the MinGW version. %%%
Bear in mind that within the "/etc/profile" file, Cygwin by default places "/usr/local/bin", "/usr/bin", and "/bin" ahead of your system-level PATH. Therefore, it is not enough to have the MinGW's "/bin" ahead of Cygwin in your Windows path... it must also be set to come first within the Cygwin environment (either by modifying "/etc/profile" or setting it manually).

Resources