Error compiling Poco sources for cygwin - c++

i downloaded poco-1.6-all for windows and im trying to build it for cygwin, im getting this error after performing a make install i need some help because i don't know how to solve this NTDDI_VERSION error:
$ make install
make -C /cygdrive/c/poco-1.6.0-all/Foundation
make[1]: Entering directory '/cygdrive/c/poco-1.6.0-all/Foundation'
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_static
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/release_shared
mkdir -p /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared
** Compiling src/ArchiveStrategy.cpp (debug, shared)
g++ -Iinclude -I/cygdrive/c/poco-1.6.0-all/CppUnit/include -I/cygdrive/c/poco-1.6.0-all/CppUnit/WinTestRunner/include -I/cygdrive/c/poco-1.6.0-all/Foundation/include -I/cygdrive/c/poco-1.6.0-all/XML/include -I/cygdrive/c/poco-1.6.0-all/JSON/include -I/cygdrive/c/poco-1.6.0-all/Util/include -I/cygdrive/c/poco-1.6.0-all/Net/include -I/cygdrive/c/poco-1.6.0-all/Crypto/include -I/cygdrive/c/poco-1.6.0-all/NetSSL_OpenSSL/include -I/cygdrive/c/poco-1.6.0-all/Data/include -I/cygdrive/c/poco-1.6.0-all/Data/SQLite/include -I/cygdrive/c/poco-1.6.0-all/Data/ODBC/include -I/cygdrive/c/poco-1.6.0-all/Data/MySQL/include -I/cygdrive/c/poco-1.6.0-all/MongoDB/include -I/cygdrive/c/poco-1.6.0-all/Zip/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/include -I/cygdrive/c/poco-1.6.0-all/PageCompiler/File2Page/include -DPOCO_NO_FPENVIRONMENT -DPOCO_NO_WSTRING -DPOCO_NO_SHAREDMEMORY -DPOCO_BUILD_HOST=PB00YCT7 -D_XOPEN_SOURCE=500 -g -D_DEBUG -c src/ArchiveStrategy.cpp -o /cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o
In file included from c:\mingw\include\_mingw.h:35:0,
from c:\mingw\include\windows.h:28,
from include/Poco/UnWindows.h:90,
from include/Poco/Platform_WIN32.h:24,
from include/Poco/Foundation.h:102,
from include/Poco/ArchiveStrategy.h:23,
from src/ArchiveStrategy.cpp:17:
c:\mingw\include\sdkddkver.h:137:8: error: #error The _WIN32_WINNT value does not match NTDDI_VERSION
# error The _WIN32_WINNT value does not match NTDDI_VERSION
^
In file included from include/Poco/ArchiveStrategy.h:23:0,
from src/ArchiveStrategy.cpp:17:
include/Poco/Foundation.h:122:4: error: #error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
#error POCO_WIN32_UTF8 and POCO_NO_WSTRING are mutually exclusive.
^
/cygdrive/c/poco-1.6.0-all/build/rules/compile:53: recipe for target '/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o' failed
make[1]: *** [/cygdrive/c/poco-1.6.0-all/Foundation/obj/CYGWIN/x86_64/debug_shared/ArchiveStrategy.o] Error 1
make[1]: Leaving directory '/cygdrive/c/poco-1.6.0-all/Foundation'
Makefile:69: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2
Here is also the line i use to compile de code:
$ ./configure --config=CYGWIN --omit=NetSSL_OpenSSL,Crypto,Data/ODBC,Data/MySQ --prefix=./_INSTALL
$ make clean
$ make -j4 -nodemos
$ make install
Any help with this error will be apreciated, thanks.

It's due to the MinGW has the c:\mingw\include\sdkddkver.h outdated in comparison to your Windows OS version. Take a look to this page:
Using the Windows Headers
And check that some #define's are not into the mentioned file. I just used Windows 8.1 and received the same error.
A solution could be to use an updated version from MinGW like MinGW-w64 or any Visual Studio version

Related

Install GCC: fatal error: gnu/stubs-32.h: No such file or directory

I'm using a server with Centos 6.6. I don't have root access and I want to install the gcc-4.8.1 to my own directory. I found a solution and I run the following commands:
wget http://www.netgull.com/gcc/releases/gcc-4.8.1/gcc-4.8.1.tar.gz
tar zxvf gcc-4.8.1.tar.gz
cd gcc-4.8.1
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.8.1/configure --prefix=$HOME/gcc-4.8.1 --enable-languages=c,c++,fortran,go
make
I got errors when running the make command. It reports the following information:
configure: error: `CC' has changed since the previous run:
configure: former value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/include -isystem /home/mypath/software/try_gcc2/installed/x86_64-unknown-linux-gnu/sys-include '
configure: current value: `/home/mypath/software/try_gcc2/objdir/./gcc/xgcc -B/home/mypath/software/try_gcc2/objdir/./gcc/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/bin/ -B/home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/lib/ -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/include -isystem /home/mypath/gcc-4.8.1/x86_64-unknown-linux-gnu/sys-include '
configure: error: in `/home/mypath/software/try_gcc2/objdir/x86_64-unknown-linux-gnu/libgcc':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/mypath/software/try_gcc2/objdir'
make: *** [all] Error 2
I cannot figure what's wrong with my command. Thank you all for helping me!!!
I think I have found the solution. When I'm trying to build gcc-5.2.0, it reports that my server does not have 32-bit libraries. It also informs that if I still want to install anyway, I can add --disable-multilib when building. I tried and now the build is running normally.

gcc 4.7 on Fedora 23 with gcc 5.3.1

I need to install gcc 4.7.x on my fedora 23 in order to make Matlab compile the code. I also came across an error when I was trying to use Cuda which required gcc 4.9.x or lower.
I tried to compile gcc-4.7.4 from scratch but I get the following errors:
Makefile:4107: recipe for target 'all-stage1-gcc' failed
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory '/home/x/src/objdir'
Makefile:19334: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/home/x/src/objdir'
Makefile:903: recipe for target 'all' failed
make: *** [all] Error 2
I made a separate directory for configuration and building and I ran the configure as:
../gcc-4.7.4/configure --enable-languages=c,c++ --disable-multilib --prefix=$HOME/gcc-4.7.4
However I think the problem rises from the fact that I am using gcc-5.3.1 to compile gcc-4.7.4 but I have no idea how to fix it.
I noticed there is no packages available from dnf to install gcc-4.7.x either.
It looks like you put your build dir inside the source tree. Don't do that. Follow the wiki's instructions.
do not run ./configure from within the source directory, this is not supported. You need to run configure from outside the source directory, in a separate directory created for the build
It'll look something like this:
tar xzf gcc-4.7.4.tar.gz
cd gcc-4.7.4
./contrib/download_prerequisites
cd ..
mkdir objdir
cd objdir
$PWD/../gcc-4.7.4/configure --no-multilib --prefix=$HOME/gcc-4.7.4 --enable-languages=c,c++
make
make install
This question is a little dated now, but patching gcc/cp/cfns.gperf did the trick for me. See here: https://gist.github.com/joka90/bb8ef36aa755994d3b3d/. Built using gcc 5.3.1 under Fedora 23.
#Download and apply fix to be able to build gcc 4.7 with gcc 5.1
cd /path/to/build/gcc/source
wget https://patchwork.ozlabs.org/patch/504982/raw/ -O cfns-fix-mismatch-in-gnu_inline-attributes.patch
patch -p1 -i cfns-fix-mismatch-in-gnu_inline-attributes.patch

Compile Lua 5.3 Mingw64 MSys2

I have installed mingw64 and MSYS2 from the official site (http://mingw-w64.org/doku.php) following the instructions. Added bin folders to win7 PATH var. Everything seems to work. I run this command from MSYS2:
gcc --version
and it works.
Now I´m trying to install Lua 5.3 (lua-5.3.1.tar.gz from lua.org). I decompressed the file using WinRAR. From MSYS2, I go to my Lua directory
cd /e/Programming/Libs/lua-5.3.1/
then I run the make command
mingw32-make mingw
But it doesn´t work. I got this message...
cd src && E:/Programming/mingw64/mingw64/bin/mingw32-make mingw
mingw32-make[1]: Entering directory 'E:/Programming/Libs/lua-5.3.1/src'
E:/Programming/mingw64/mingw64/bin/mingw32-make "LUA_A=lua53.dll" "LUA_T=lua.exe" \
"AR=gcc -std=gnu99 -shared -o" "RANLIB=strip --strip-unneeded" \
"SYSCFLAGS=-DLUA_BUILD_AS_DLL" "SYSLIBS=" "SYSLDFLAGS=-s" lua.exe
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- =
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- g
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- u
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- 9
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- 9
E:\Programming\mingw64\mingw64\bin\mingw32-make: invalid option -- a
E:\Programming\mingw64\mingw64\bin\mingw32-make: unrecognized option '--strip-unneeded SYSCFLAGS=-DLUA_BUILD_AS_DLL SYSLIBS= SYSLDFLAGS=-s lua.exe'
Usage: mingw32-make [options] [target] ...
This program built for x86_64-w64-mingw32
Report bugs to <bug-make#gnu.org>
makefile:116: recipe for target 'mingw' failed
mingw32-make[1]: *** [mingw] Error 2
mingw32-make[1]: Leaving directory 'E:/Programming/Libs/lua-5.3.1/src'
makefile:55: recipe for target 'mingw' failed
mingw32-make: *** [mingw] Error 2
I dont want to download Lua binaries, I want to compile it myself
How can I fix this?
I was having the same issue. I looked at this page:
http://www.thijsschreijer.nl/blog/?p=863
What I saw was that I did not have c:\mingw\msys\1.0\bin in my path variable. I added it just after the MinGW\bin path and it worked fine then.

Compiling Qt 4.8.5 using mingw32 on windows7: "no such file or directory"

I'm trying to build qt-4.8.5 (opensource) from source using mingw32 compiler on windows 7.
"configure" works fine, but compilation (mingw32-make) fails with this output:
D:\development\qt-4.8.5-mingw>mingw32-make
cd src/tools/bootstrap/ && D:/development/MinGW/bin/mingw32-make.EXE -f Makefile
mingw32-make.EXE[1]: Entering directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
D:/development/MinGW/bin/mingw32-make.EXE -f Makefile.Release
mingw32-make.EXE[2]: Entering directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM -DQT_NO_GEOM_VARIANT -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_STL -DQT_NO_SYSTEMLOCALE -DQT_NO_TEXTSTREAM -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT_NODLL -I'../../../include' -I'../../../include/QtCore' -I'../../../include/QtXml' -I'../../3rdparty/zlib' -I'd:/development/MSVS2008EXP/VC/INCLUDE' -I'd:/development/Microsoft SDKs/Windows/v6.1/include' -I'd:/development/MSVS2008EXP/VC/lib/' -I'd:/development/MS_SDKs/Windows/v6.1/Lib' -I'd:/DXSDK/Lib/x86' -I'../../../mkspecs/win32-g++-4.6' -o tmp/obj/release_shared/qisciicodec.o ../../corelib/codecs/qisciicodec.cpp
g++: error: CreateProcess: No such file or directory
Makefile.Release:333: recipe for target 'tmp/obj/release_shared/qisciicodec.o' failed
mingw32-make.EXE[2]: *** [tmp/obj/release_shared/qisciicodec.o] Error 1
mingw32-make.EXE[2]: Leaving directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
Makefile:34: recipe for target 'release' failed
mingw32-make.EXE[1]: *** [release] Error 2
mingw32-make.EXE[1]: Leaving directory 'd:/development/qt-4.8.5-mingw/src/tools/bootstrap'
Makefile:68: recipe for target 'sub-tools-bootstrap-make_default-ordered' failed
mingw32-make.EXE: *** [sub-tools-bootstrap-make_default-ordered] Error 2
I.e.:
g++: error: CreateProcess: No such file or directory
Because g++ DOESN'T print which file it can't find, I'm not certain what could be causing this.
I can call g++, gcc and mingw32-make from command line and they're in Path.
I've removed VC directories, MS SDK directories, and this doesn't fix the problem either.
This is a clean "install", I extracted tar.gz contents, and run configure without modifying anything. Adding mingw include path via -I switch to configure doesn't fix the problem.
How do I fix this?
Additional info:
g++ version: 4.7.1
mingw32-make version: 3.82.90
Figured it out. (Well, I still don't know what was causing this, but I know how to make it work).
Solution:
Place qt.conf into qt "bin" directory.
[Paths]
Prefix = d:/development/qt-4.8.5-mingw
Prefix is path of your qt installation (notice forward slashes).
Configure and compile using bat files:
To configure:
set QTDIR=D:\development\qt-4.8.5-mingw
set QMAKESPEC=win32-g++
set PATH=D:\development\MinGW\bin;D:\development\tools\Perl32\bin;D:\development\qt-4.8.5-mingw\bin
set PATH=%PATH%;c:\Windows\system32
set INCLUDE=
set LIB=
set CPATH=
set CPLUS_INCLUDE_PATH=
set LANG=en
configure -opensource -openssl
You should put into path bin directory of 32bit perl, bin directory of mingw32 installation, and bin directory of qt installation. -openssl key is optional (I need this one).
To compile:
set QTDIR=D:\development\qt-4.8.5-mingw
set QMAKESPEC=win32-g++
set PATH=D:\development\MinGW\bin;D:\development\tools\Perl32\bin;D:\development\qt-4.8.5-mingw\bin
set PATH=%PATH%;c:\Windows\system32
set INCLUDE=
set LIB=
set CPATH=
set CPLUS_INCLUDE_PATH=
set LANG=en
mingw32-make

Compiling Festival on MingW32

I'm trying to compile Festival on MingW32, so I can have a Windows binary. I couldn't find the Windows binary on their site. Anyone have one they can post?
If not, here's what I have so far. I did the ./configure and make for it and have the following message:
$ make
config/config:43: ../speech_tools/config/config: No such file or directory
So, I downloaded the speech_tools tar ball and got. Did the ./configure and make to get:
$ make
config/config:156: config/systems/ix86_unknown.mak: No such file or directory
../config/config:156: ../config/systems/ix86_unknown.mak: No such file or directory
make: *** No rule to make target `../config/systems/ix86_unknown.mak'. Stop.
config/rules/modules.mak:133: config/modincludes.inc: No such file or directory
make --no-print-directory -C ./config MADE_FROM_ABOVE=1 MODINCLUDES=1 INCLUDE_EVERYTHING='' modincludes.inc
../config/config:156: ../config/systems/ix86_unknown.mak: No such file or directory
make[1]: *** No rule to make target `../config/systems/ix86_unknown.mak'. Stop.
make: *** [config/modincludes.inc] Error 2
So, I copied config/systems/ix86_CYGWIN32.mak to ix86_unknown.mak and tried again. Now I get this message:
g++ -c -fno-implicit-templates -O3 -Wall -Wno-non-template-friend -Wno-deprecated -DSUPPORT_EDITLINE -I../include slib.cc
In file included from slib.cc:85:
../include/EST_unix.h:53:25: sys/wait.h: No such file or directory
../include/EST_unix.h:54:29: sys/resource.h: No such file or directory
In file included from ../include/EST_String.h:50,
from ../include/siod.h:17,
from slib.cc:88:
../include/EST_iostream.h:54:26: strstream.h: No such file or directory
In file included from ../include/EST_TList.h:50,
from ../include/EST_string_aux.h:43,
from ../include/siod.h:18,
from slib.cc:88:
Where do I get sys/wait.h, sys/resource.h and strstream.h? I'd rather not have to try this whole bit in Cygwin and carry around those annoying DLL's. Any advice?
Windows binaries are available here
You'll get further with a full cygwin install instead of just mingwin, but I can't promise success.
I run Ubuntu and remember having Festival available in the Synaptics repository, implying I just had to double click the name, and the thing installed itself with all its dependencies.
If all else fails, you might want to run a VM with ubuntu or dual boot.