Directory change error with mingw32-make - makefile

I'm building POCO library 1.6.0 under MinGW32, environment: Windows 7 Ultimate 32-bit, shell: MSYS. Successfully executed ./configure.
$ ./configure
Configured for MinGW
Contents of config.make:
POCO_CONFIG = MinGW
POCO_BASE = /c/dev/poco
POCO_BUILD = /c/dev/poco
POCO_PREFIX = /usr/local
POCO_FLAGS =
OMIT =
export POCO_CONFIG
export POCO_BASE
export POCO_BUILD
export POCO_PREFIX
export POCO_FLAGS
After launching mingw32-make I'm getting:
$ mingw32-make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File `poco' does not exist.
File `libexecs' does not exist.
File `Foundation-libexec' does not exist.
Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
mingw32-make: Entering directory `c:/dev/poco'
C:/app/MinGW/bin/mingw32-make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
mingw32-make: Leaving an unknown directory
mingw32-make: *** [Foundation-libexec] Error 2
mingw32-make: Leaving directory `c:/dev/poco'
The problem is in
mingw32-make: Entering an unknown directory
mingw32-make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
because /c/dev/poco/Foundation does exist:
$ ls
CHANGELOG LICENSE VERSION build_vs110.cmd config.make
CMakeLists.txt MANIFEST XML build_vs120.cmd configure
CONTRIBUTORS Makefile build build_vs90.cmd contrib
CppUnit NEWS build_CE_vs90.cmd buildwin.cmd doc
DLLVersion.rc Net build_vcexpress2008.cmd cmake libversion
Foundation README build_vcexpress2010.cmd components patches
JSON Util build_vs100.cmd config.build
I was modifying makefile to change directory to other sub-folders, no joy. It seems like something prevents mingw32-make from changing directory. Also can confirm that
cd /c/dev/poco/Foundation
works fine.
Tried with make, result is the same:
$ make --debug -w
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....
File `poco' does not exist.
File `libexecs' does not exist.
File `Foundation-libexec' does not exist.
Must remake target `Foundation-libexec'.
Invoking recipe from Makefile:69 to update target `Foundation-libexec'.
make: Entering directory `c:/dev/poco'
C:/app/MinGW/msys/1.0/bin/make -d -C /c/dev/poco/Foundation
GNU Make 3.82
Built for i386-pc-mingw32
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
make: Entering an unknown directory
make: *** /c/dev/poco/Foundation: No such file or directory. Stop.
make: Leaving an unknown directory
make: *** [Foundation-libexec] Error 2
make: Leaving directory `c:/dev/poco'
There are no obvious reasons for mingw32-make to fail as path does not have spaces.
What I have missed? Any suggestions welcome.

The path /c/dev/poco/Foundation does not mean what you seem to think, in the context of mingw32-make.exe. See, mingw32-make.exe is a native Windows application, so it definitely will not understand an MSYS specific path such as /c/dev/poco/Foundation; rather, it will interpret it "as is", as c:/c/dev/poco/Foundation, (assuming your current working drive is c:), which I'm sure is not what you intended.
You do seem to be using MSYS as your shell, so why are you using mingw32-make.exe anyway? Use the make.exe that MSYS itself provides; it does understand MSYS paths.
Do note that, if you run make --version from the MSYS shell, you should see, (at this time of writing):
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i686-pc-msys
In your updated question, you show an example of running make.exe, which clearly is not this MSYS version; it appears that you have placed an alternative version of make.exe -- perhaps even a copy of mingw32-make.exe itself, for the output is identical -- in some directory which precedes the MSYS version in your $PATH. You should delete this non-MSYS version of make.exe; the entire purpose in calling the MinGW version mingw32-make.exe is to avoid this very conflict. When you run make from the MSYS shell, you want the MSYS version, and not some mingw32-make.exe clone.

Related

Make does not compile under windows - Cmake, Msys, MinGW

I am following this guide in order to build Opencascade frmo source:
https://github.com/tpaviot/oce/blob/master/BUILD.MINGWw64.md
I have done everything up to the MSYS part.
The CMake configuration and generation was succesfull.
I now have a folder with all the things that CMake generated.
So i start MSYS2, and i cd into that directory.
Then i type make.
This is what i get:
User1#User1-PC MSYS ~/Desktop/OpenCascade project/oce/BUILD
$ make
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\User1\Desktop\OpenCascade project\oce\BUILD>
As you can see, nothing happens, no compilation. There is a prompt for me to type. But nothing gets executed.
EDIT:
*I redid the proccess in a new directory, so that no space characters exist in my directory. Problem still remains.
*When i run make --version, i get this:
$ make --version
GNU Make 4.3 Built for x86_64-pc-msys Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
*When i exit the prompt (CONTROL + C) i get this:
C:\Users\User1\Desktop\OPENCAS\oce\BUILD>make: *** [Makefile:1734: cmake_check_build_system] Interrupt
*These are the contents of the makefile, line 1734:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
*When i run make VERBOSE=1, i get this:
User1#User1-PC MSYS ~/Desktop/OPENCAS/oce/BUILD
$ make VERBOSE=1
"C:\Program Files\CMake\bin\cmake.exe" -SC:\Users\User1\Desktop\OPENCAS\oce -BC:\Users\User1\Desktop\OPENCAS\oce\BUILD --check-build-system CMakeFiles\Makefile.cmake 0
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

Compiling autoconf results in an incorrect version reporting

I want to update from autoconf 2.62 to 2.69.
I downloaded the source and ran the following:
./configure
make
make install
These all complete successfully.
When I run autoconf --version I get the following:
autoconf --version
autoconf (GNU Autoconf) ?K??
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
The problem you see here is that the version reports as ?K??.
Why could this be? My machine runs in the EBCDIC codepage and I am wondering if this could be associated. Is there a configure / make option I need to add.
This issues stops me compiling other software, as the configure scripts check the version autoconf reports and it ends up failing those checks.
-----UPDATE-------
I have run make check as requested and this is the output:
autoconf269: >make check
make check-recursive
Making check in bin
Making check in .
Making check in lib
Making check in Autom4te
Making check in m4sugar
make check-local
Making check in autoconf
make check-local
Making check in autotest
make check-local
Making check in autoscan
Making check in emacs
Making check in doc
make: Makefile: line 436: Warning -- FSUM9433 Duplicate entry [fdl.texi] in prerequisite list
Making check in tests
make check-local
cd ../lib/autotest && make autotest.m4f
`autotest.m4f' is up to date
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '..'/lib --language=autotest -I . -I . suite.at -o ./testsuite.tmp
m4:local.at:18: bad expression in eval (bad input): ((?+1+0) > (2+0)) - ((?+1+0) < (2+0))
autom4te: /workarea/tools/m4/bin/m4 failed with exit status: 1
FSUM8226 make: Error code 1
FSUM8226 make: Error code 255
FSUM8226 make: Error code 1
FSUM8226 make: Error code 255
My eyes are drawn to : m4:local.at:18: bad expression in eval (bad input): ((?+1+0) > (2+0)) - ((?+1+0) < (2+0)) -- any ideas why this may be considered a bad expression?
One possiblity: the autoconf you compiled installed into /usr/local while the preinstalled one is in /usr. /usr is first in PATH so the preinstalled one is used.
You can also check the version before running make install to ensure, that the new verson fixes your problem.

How to tell automake to find my version of aclocal when recompiling hunspell?

I am currently recompiling hunspell from the git source downloaded from fedora as follows:
git://pkgs.fedoraproject.org/hunspell.git
As mentioned by the steps in HACKING, I installed all prerequisite and execute the build commands:
autoconf && ./configure && make
And I received this error message:
CDPATH="${ZSH_VERSION+.}:" && cd . && aclocal-1.13 -I m4
/bin/bash: aclocal-1.13:命令找不到 (command not found)
Makefile:463: recipe for target 'aclocal.m4' failed
make: *** [aclocal.m4] Error 127
My computer has automake 1.14 installed.
tom#bktkowks04:~/Development/hunspell$ aclocal --version
aclocal (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <tromey#redhat.com>
and Alexandre Duret-Lutz <adl#gnu.org>.
tom#bktkowks04:~/Development/hunspell$ which aclocal
/usr/bin/aclocal
tom#bktkowks04:~/Development/hunspell$
Which the offending statement happends when the system is "make"ing. Is there anyway for me to tell make to locate my aclocal? I tried to trace the steps when making. Shall I post the steps listed?
Thanks all.

The syntax of the command is incorrect while compiling Clang with GCC-4.9.1_x64

After coming across some problems regarding cmake and gcc-4.9.1 on windows system, and spending more than 2 hours of building llvm with clang I got a really nice error that I can't seem to find information on. I've done everything according to documentation and here's the story-teller error message that make gives me:
Scanning dependencies of target LTO_exports
[ 69%] Creating export file for LTO
The syntax of the command is incorrect.
make[2]: *** [tools/lto/LTO.def] Error 1
make[1]: *** [tools/lto/CMakeFiles/LTO_exports.dir/all] Error 2
make: *** [all] Error 2
That is all to it, no other detail available at all. I've checked the LTO.def file since it references that. The file contains one single entry: "EXPORTS[CR][LF]". The LTO_exports.dir/all contains the following files:
build.make
cmake_clean.cmake
depend.internal
depend.make
DependInfo.cmake
progress.make
I haven't touched these files at all. I used the following cmake command before actually using make.
C:\LLVM_Binaries>cmake -G"MinGW Makefiles" -DCMAKE_C_COMPILER="C:/MinGW/bin/gcc.exe" -DCMAKE_CXX_COMPILER="C:/MinGW/bin/g++.exe" -DCMAKE_MAKE_PROGRAM="C:/MinGW/bin/make.exe" -DCMAKE_BUILD_TYPE=Release ..\LLVM
Also here're the details of gcc g++ and make:
gcc --version
gcc (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
g++ --version
g++ (GCC) 4.9.1
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
make -v
GNU Make 3.82
Built for x86_64-w64-mingw32
This program is built by Equation Solution <http://www.Equation.com>
for Windows.
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Anyone else experienced this problem and managed to build llvm with clang on 64bit Windows operating system?
#Edit (output of make VERBOSE=1)
Scanning dependencies of target LTO_exports
make[2]: Leaving directory `C:/LLVM_Binaries'
make -f tools\lto\CMakeFiles\LTO_exports.dir\build.make tools/lto/CMakeFiles/LTO_exports.dir/build
make[2]: Entering directory `C:/LLVM_Binaries'
"C:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report C:\LLVM_Binaries\CMakeFiles
[ 69%] Creating export file for LTO
cd /d C:\LLVM_Binaries\tools\lto && "C:\Program Files (x86)\CMake\bin\cmake.exe" -E echo EXPORTS > LTO.def
cd /d C:\LLVM_Binaries\tools\lto && type C:/LLVM/tools/lto/lto.exports >> LTO.def
The syntax of the command is incorrect.
make[2]: *** [tools/lto/LTO.def] Error 1
make[2]: Leaving directory `C:/LLVM_Binaries'
make[1]: *** [tools/lto/CMakeFiles/LTO_exports.dir/all] Error 2
make[1]: Leaving directory `C:/LLVM_Binaries'
make: *** [all] Error 2
After digging in this issue quite deeply I've successfully built it. For anyone who might get this error while compiling llvm&clang on windows with gcc: http://reviews.llvm.org/D5476#5e5fbd1d
Of course you can avoid this problem by using the sources from their SVN instead of downloading the latest stable release from http://llvm.org/releases/download.html#3.5
Did you run the configuration file before running cmake?
sh ./configure
If that doesn't work, try using the 32 bit version of your compiler. If that works, you can build for 64-bit by compiling a GCC 32-bit cross compiler.
You could also try Cygwin - perhaps that might help. Or if you're really stuck you could go backtracking and run the problematic command from a terminal, not a makefile.

CUDA SDK issues with gcc/g++: old version of gcc can't find old version of g++?

I'm installing CUDA on F15. I'm well aware of the fact CUDA needs older versions gcc/g++ and I've installed gcc/g++ 4.5.1, and softlinked them as documented here. I no longer get the error mentioned in that post...however, when I tried compiling the SDK, I get the following error:
make[1]: Entering directory `/home/whao/NVIDIA_GPU_Computing_SDK/C/src/bilateralFilter'
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
make[1]: *** [obj/x86_64/release/filter_kernel.cu.o] Error 1
I suspect that somehow, the older version of g++ in question isn't being recognized? For what it's worth, consider the following two outputs:
[whao#gen-whao-cuda C]$ /usr/local/cuda/bin/gcc --version
gcc (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[whao#gen-whao-cuda C]$ /usr/local/cuda/bin/g++ --version
g++ (GCC) 4.5.1 20101130 (Red Hat 4.5.1-6)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
There is a file named host_config.h where gcc version is checked (the path is /usr/local/cuda/include). You can comment out the appropriate if part (if gcc_version>4.5.* ....). gcc 4.5 may be supported in toolkit 4.1 but if this lines remain, there always be an error before even start compiling.

Resources