Compiling in Windows: Errors

RetroShare Development discussion

Compiling in Windows: Errors

Postby NyvenZA » Sun Jun 28, 2015 11:19 am

I have now tried to install 2 environments using the Wiki page and the files from there and have not been able to successfully get the initial environment working.
I started this post after I started the second environment. I will be updating this post as I go along. I didn't take down all the errors the first time round.
This post will report where the errors are and if I get solutions to it.
I am using a Windows 10 64bit PC now.

Here are the issue I have picked up so far and what I have tried to do to get it to work:
I used this page:
http://retroshare.sourceforge.net/wiki/index.php/Win32CompileQtCreator

I installed the exact versions of QT and QT Creator.
  1. The first time I tried to use MinGW (32bit) and changed the location to C:\MinGW. It has the installation Manager interface that downloads all the software packages.
  2. The second time I used the MingW-w64 and used the default 5.1.0 with i686 settings. I didn't change any of the settings. I have not been able to find the installation manager for this.

I tried the 32bit MinGW installer from SourceForge. But when I tried to compile the libssh there were errors with version 0.5.4, 0.6.3, 0.6.4. From libssh 0.6.5 and up it doesn't compile because there are features that are not compiled into the MinGW. (https://red.libssh.org/issues/180)
Code: Select all
 'EINPROGRESS' undeclared (first use in this function)


The 64Bit version of MingW doesn't come with MSYS, so I had to download it from http://sourceforge.net/p/mingw-w64/wiki2/MSYS/
I extracted it to C:\MSYS
Then I edited the C:\MSYS\MSYS.BAT file and added the path to the 64bit MingW at the top, like this:
Code: Select all
PATH=%PATH%;c:\Program Files (x86)\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\



I then downloaded the cmake: cmake-3.3.0-rc3-win32-x86.zip
I extracted it to c:\qt\cmake-3.3.0-rc3-win32-x86
Then I added this path to the ~/.profile
Code: Select all
export PATH="${PATH}:/c/Qt/cmake-3.3.0-rc3-win32-x86/bin/"

If you have not run the msys.bat yet, the "home folder" will not exist yet.
the .profile file must be created here: (there is a dot in front of the file-name)
Code: Select all
C:\MSYS\home\[your user name]\.profile


Now I extracted the Build.RAR.
I ran C:\msys\msys.bat to give me a BASH shell.
The result was:
Code: Select all
cd /c/Qt/RetroShare/Build
make
......

c:\Program Files (x86)\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\ar.exe: creating ../libcrypto.a                                                                                         
[ -z "" ] || ar  r ../libcrypto.a fipscanister.o                                                   
/c/Program Files (x86)/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin//ranlib.exe ../libcrypto.a || echo Never mind.                                                                           
/bin/sh: -c: line 0: syntax error near unexpected token `('                                         
/bin/sh: -c: line 0: `/c/Program Files (x86)/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin
//ranlib.exe ../libcrypto.a || echo Never mind.'                                                   
make[2]: *** [../libcrypto.a] Error 2                                                               
make[2]: Leaving directory `/c/qt/RetroShare/Build/openssl-1.0.1h/crypto'                           
make[1]: *** [build_crypto] Error 1                                                                 
make[1]: Leaving directory `/c/qt/RetroShare/Build/openssl-1.0.1h'                                 
make: *** [openssl] Error 2                                                                         


I assume that the scripts don't like the "C:\program files (x86)" with all the spaces and brackets. I then moved the mingw-w64 folder to the C:\qt\ folder and adjusted the C:\msys\msys.bat file with the new path.
Code: Select all
PATH=%PATH%;c:\QT\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\

I then quit and started the msys.bat and tried to compile the build folder again.
Code: Select all
cd /c/Qt/RetroShare/Build
make

Now it went past the libcrypto.
I am still waiting for everything to finish downloading and compiling. I will update here once I am further.

Done sofar:
opencv
libbz2.a
libcrypto.a
libexslt.a
libminiupnpc.a
libspeex.a
libspeexdsp.a
libssl.a
libxml2.a
libxslt.a
libz.a

libcurl.a
libssh.a
libssh_threads.a

libprotobuf.a
libsqlcipher.a

It took an hour to finish everything with out errors now.

Next, going to try and compile the trunk source.
Having never used the new QT Creator, I am now stuck trying to opene the project.
I have selected the RetroShare.pro from the Open Project Button and from the File Menu and it asks me to select a KIT.
"The QT Creator uses the invalid kit Desktop to parse the project." is displayed and then I have to import Build information from somewhere.

Ok, So now I had to figure out why this didn't work.
QT Creator (running it from the shortcut) doesn't have all the paths that I have now configured in the MSYS.bat.
I tried to start Qtcreatoer from /c/qt/qtcreator-3.2.1/bin
Code: Select all
cd  /c/qt/qtcreator-3.2.1/bin
./qtcreator


Now when I go to Tools -> Options -> Kits -> Desktop (default)
I could select the MinGW Compiler and the QT version
Still need to figure out how to get the debugger option.

Once I saved, I could open the Project and import it.

Next Problem:
When i try and Build "RetroShare", I get and error:
ERROR 1
Code: Select all
C:\Qt\RetroShare\trunk\openpgpsdk\src\openpgpsdk\packet.h:32: error: openssl/bn.h: No such file or directory


It seems that the Folder with all the Build files are not included int he path or INCLUDEPATH.
Trying to figure out how to get this in properly with out changing source, since the source is supposed to just compile, if I understand the process correctly.

SOLUTION 1
It seems that the BUILD.RAR make process is creating a "libs" folder inside the build folder. This folder should be at the same level as the build folder, since all the other projects reference it with "../../../libs"
So I moved the libs folder from the "C:\QT\Retroshare\build\libs" location to "C:\QT\Retroshare\libs"


ERROR 2
Now I get the following error when I try and compile:
Code: Select all
C:\Qt\RetroShare\trunk\libresapi\src\api\ApiServerMHD.h:7: error: microhttpd.h: No such file or directory

This seems to be libmicrohttp that is not referenced anywhere in the installation process.
https://www.gnu.org/software/libmicrohttpd/

SOLUTION 2
I am not sure if this is the correct way to fix this.
I modified the Makefile from the Build.rar to also download libmicrohttpd, compile it and include the LIB and INCLUDE files.
Now the MicroHTTPD parts compile.

I dont think this is correct. The compile finishes without an error, but when I try and run the GUI version a Command window appears, and a windows error box pops up with:
Code: Select all
The program can't start because libmicrohttpd-10.dll is missing from your computer.Try reinstalling the program to fix this problem.


I then copy the DLL from the libs folder to the Retroshare folder and then I get a different error:
Code: Select all
The procedure entry point
_ZNKSt7__cxx1112basic_stringlcSt11char_traitslcESalcEE12find_last_ofEcj
could not be located in the dynamic link library


Looking for a why to disable the webUI for the GUI compile. I see that you can enable it for the nongui version.
Last edited by NyvenZA on Sun Jun 28, 2015 3:49 pm, edited 10 times in total.
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors

Postby NyvenZA » Sun Jun 28, 2015 11:44 am

Here are some questions I would like to follow up on:

Is the Build.RAR file ever updated with new versions of the software?

Is the make script available in the repositories?

Why is the latest versions is libSSH not used?
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors

Postby electron » Tue Jun 30, 2015 12:46 pm

There is no easy way to disable webui compile.

NyvenZA wrote:Is the Build.RAR file ever updated with new versions of the software?

it is updated, but not very often (so it is outdated in between)

NyvenZA wrote:Is the make script available in the repositories?

not yet. But i think it is a good idea. I have this on my todolist. (i'm talking about the library build script for windows, not the rs-build script)

NyvenZA wrote:Why is the latest versions is libSSH not used?

nobody updated the ssh-rpc code for v0.6. Lots of things changed, and ssh-rpc was left behind.
electron
 
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Re: Compiling in Windows: Errors

Postby NyvenZA » Tue Jun 30, 2015 4:18 pm

Thanks for replying.
Got stuck at the point where the microhttpd dll failed to work. Is there a specific version I should be using?
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors

Postby electron » Thu Jul 02, 2015 1:56 pm

libmicrohttpd: use latest version (file streaming needs a recent version to work)
openssl: use latest version (for security)
sqlcipher: use the version provided in the makefile (else you are stuck with the version/can't use the old profile created with a different version)
miniupnpc: use the version provided in the makefile (else will not compile)
electron
 
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Re: Compiling in Windows: Errors

Postby NyvenZA » Sat Jul 04, 2015 5:19 am

OK, I updated the Makefile that comes with the Build.RAR to include the new versions, I added the Libmicrohttpd.
Can someone verify that I have done this correctly and that it is working for them?
Code: Select all
ZLIB_VERSION=1.2.3
BZIP2_VERSION=1.0.6
MINIUPNPC_VERSION=1.3
#OPENSSL_VERSION=1.0.1h
OPENSSL_VERSION=1.0.2c
SPEEX_VERSION=1.2rc1
OPENCV_VERSION=2.4.9
LIBXML2_VERSION=2.9.1
LIBXSLT_VERSION=1.1.28
CURL_VERSION=7.34.0
LIBSSH_VERSION=0.5.4
PROTOBUF_VERSION=2.4.1
TCL_VERSION=8.6.2
SQLCIPHER_VERSION=2.2.1
MICROHTTPD_VERSION=0.9.42

all: dirs zlib bzip2 miniupnpc openssl speex opencv libxml2 libxslt curl libssh protobuf sqlcipher libmicrohttpd

dirs:
   mkdir -p libs/include
   mkdir -p libs/lib
   mkdir -p libs/bin

libmicrohttpd-$(MICROHTTPD_VERSION).tar.gz:
   curl.exe -L http://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-$(MICROHTTPD_VERSION).tar.gz -o libmicrohttpd-$(MICROHTTPD_VERSION).tar.gz

libmicrohttpd: libmicrohttpd-$(MICROHTTPD_VERSION).tar.gz
   tar xvf libmicrohttpd-$(MICROHTTPD_VERSION).tar.gz
   cd libmicrohttpd-$(MICROHTTPD_VERSION) && ./configure
   cd libmicrohttpd-$(MICROHTTPD_VERSION) && make
   mkdir -p libs/include && cp libmicrohttpd-$(MICROHTTPD_VERSION)/src/include/microhttpd.h libs/include/
   mkdir -p libs/lib && cp libmicrohttpd-$(MICROHTTPD_VERSION)/src/microhttpd/.libs/libmicrohttpd.a libs/lib/
   mkdir -p libs/lib && cp libmicrohttpd-$(MICROHTTPD_VERSION)/src/microhttpd/.libs/libmicrohttpd.la libs/lib/
   mkdir -p libs/lib && cp libmicrohttpd-$(MICROHTTPD_VERSION)/src/microhttpd/.libs/libmicrohttpd-10.dll libs/lib/
   mkdir -p libs/lib && cp libmicrohttpd-$(MICROHTTPD_VERSION)/src/microhttpd/.libs/libmicrohttpd.dll.a libs/lib/
   touch libmicrohttpd

zlib-$(ZLIB_VERSION).tar.gz:
   curl.exe -L http://sourceforge.net/projects/libpng/files/zlib/$(ZLIB_VERSION)/zlib-$(ZLIB_VERSION).tar.gz/download -o zlib-$(ZLIB_VERSION).tar.gz

zlib: zlib-$(ZLIB_VERSION).tar.gz
   tar xvf zlib-$(ZLIB_VERSION).tar.gz
   cd zlib-$(ZLIB_VERSION) && ./configure
   #cd zlib-$(ZLIB_VERSION) && make install prefix="`pwd`/../libs"
   cd zlib-$(ZLIB_VERSION) && make
   cp zlib-$(ZLIB_VERSION)/zlib.h libs/include/
   cp zlib-$(ZLIB_VERSION)/zconf.h libs/include/
   cp zlib-$(ZLIB_VERSION)/libz.a libs/lib/
   rm -r -f zlib-$(ZLIB_VERSION)
   touch zlib

bzip2-$(BZIP2_VERSION).tar.gz:
   curl.exe http://bzip.org/$(BZIP2_VERSION)/bzip2-$(BZIP2_VERSION).tar.gz -o bzip2-$(BZIP2_VERSION).tar.gz

bzip2: bzip2-$(BZIP2_VERSION).tar.gz
   tar xvf bzip2-$(BZIP2_VERSION).tar.gz
   #cd bzip2-$(BZIP2_VERSION) && make install PREFIX="`pwd`/../libs"
   cd bzip2-$(BZIP2_VERSION) && make
   cp bzip2-$(BZIP2_VERSION)/bzlib.h libs/include/
   cp bzip2-$(BZIP2_VERSION)/libbz2.a libs/lib/
   rm -r -f bzip2-$(BZIP2_VERSION)
   touch bzip2

miniupnpc-$(MINIUPNPC_VERSION).tar.gz:
   curl.exe -L http://miniupnp.free.fr/files/download.php?file=miniupnpc-$(MINIUPNPC_VERSION).tar.gz -o miniupnpc-$(MINIUPNPC_VERSION).tar.gz

miniupnpc: miniupnpc-$(MINIUPNPC_VERSION).tar.gz
   tar xvf miniupnpc-$(MINIUPNPC_VERSION).tar.gz
   cd miniupnpc-$(MINIUPNPC_VERSION) && make -f Makefile.mingw init libminiupnpc.a miniupnpc.dll
   mkdir -p libs/include/miniupnpc && cp miniupnpc-$(MINIUPNPC_VERSION)/*.h libs/include/miniupnpc/
   cp miniupnpc-$(MINIUPNPC_VERSION)/libminiupnpc.a libs/lib/
   cp miniupnpc-$(MINIUPNPC_VERSION)/miniupnpc.dll libs/bin/
   rm -r -f miniupnpc-$(MINIUPNPC_VERSION)
   touch miniupnpc

openssl-$(OPENSSL_VERSION).tar.gz:
   curl.exe -k https://www.openssl.org/source/openssl-$(OPENSSL_VERSION).tar.gz -o openssl-$(OPENSSL_VERSION).tar.gz

openssl: openssl-$(OPENSSL_VERSION).tar.gz
   tar xvf openssl-$(OPENSSL_VERSION).tar.gz
   #cd openssl-$(OPENSSL_VERSION) && ./config --prefix="`pwd`/../libs"
   #cd openssl-$(OPENSSL_VERSION) && make install
   cd openssl-$(OPENSSL_VERSION) && ./config
   cd openssl-$(OPENSSL_VERSION) && make
   mkdir -p libs/include/openssl && cp openssl-$(OPENSSL_VERSION)/include/openssl/*.h libs/include/openssl/
   cp openssl-$(OPENSSL_VERSION)/libcrypto.a libs/lib/
   cp openssl-$(OPENSSL_VERSION)/libssl.a libs/lib/
   rm -r -f openssl-$(OPENSSL_VERSION)
   touch openssl

speex-$(SPEEX_VERSION).tar.gz:
   curl.exe http://downloads.xiph.org/releases/speex/speex-$(SPEEX_VERSION).tar.gz -o speex-$(SPEEX_VERSION).tar.gz

speex: speex-$(SPEEX_VERSION).tar.gz
   tar xvf speex-$(SPEEX_VERSION).tar.gz
   cd speex-$(SPEEX_VERSION) && ./configure
   #cd speex-$(SPEEX_VERSION) && make install exec_prefix="`pwd`/../libs"
   cd speex-$(SPEEX_VERSION) && make
   mkdir -p libs/include/speex && cp speex-$(SPEEX_VERSION)/include/speex/*.h libs/include/speex/
   cp speex-$(SPEEX_VERSION)/libspeex/.libs/libspeex.a libs/lib
   cp speex-$(SPEEX_VERSION)/libspeex/.libs/libspeexdsp.a libs/lib
   rm -r -f speex-$(SPEEX_VERSION)
   touch speex

opencv-$(OPENCV_VERSION).tar.gz:
   curl.exe -L -k https://github.com/Itseez/opencv/archive/$(OPENCV_VERSION).tar.gz -o opencv-$(OPENCV_VERSION).tar.gz

opencv: opencv-$(OPENCV_VERSION).tar.gz
   tar xvf opencv-$(OPENCV_VERSION).tar.gz
   mkdir -p opencv-$(OPENCV_VERSION)/build
   #cd opencv-$(OPENCV_VERSION)/build && cmake .. -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="`pwd`/../../libs"
   cd opencv-$(OPENCV_VERSION)/build && cmake .. -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX="`pwd`/install"
   cd opencv-$(OPENCV_VERSION)/build && make install
   cp -r opencv-$(OPENCV_VERSION)/build/install/include/* libs/include/
   mkdir -p libs/lib/opencv && cp -r opencv-$(OPENCV_VERSION)/build/install/x64/mingw/staticlib/* libs/lib/opencv/
   rm -r -f opencv-$(OPENCV_VERSION)
   touch opencv

libxml2-$(LIBXML2_VERSION).tar.gz:
   curl.exe ftp://xmlsoft.org/libxml2/libxml2-$(LIBXML2_VERSION).tar.gz -o libxml2-$(LIBXML2_VERSION).tar.gz

libxml2: libxml2-$(LIBXML2_VERSION).tar.gz
   tar xvf libxml2-$(LIBXML2_VERSION).tar.gz
   cd libxml2-$(LIBXML2_VERSION) && ./configure --without-iconv -enable-shared=no
   #cd libxml2-$(LIBXML2_VERSION) && make install exec_prefix="`pwd`/../libs"
   cd libxml2-$(LIBXML2_VERSION) && make
   mkdir -p libs/include/libxml && cp libxml2-$(LIBXML2_VERSION)/include/libxml/*.h libs/include/libxml/
   cp libxml2-$(LIBXML2_VERSION)/.libs/libxml2.a libs/lib/
   touch libxml2

libxslt-$(LIBXSLT_VERSION).tar.gz:
   curl.exe ftp://xmlsoft.org/libxml2/libxslt-$(LIBXSLT_VERSION).tar.gz -o libxslt-$(LIBXSLT_VERSION).tar.gz

libxslt: libxml2-$(LIBXML2_VERSION).tar.gz libxslt-$(LIBXSLT_VERSION).tar.gz
   tar xvf libxml2-$(LIBXML2_VERSION).tar.gz
   tar xvf libxslt-$(LIBXSLT_VERSION).tar.gz
   tar xvf libxslt-$(LIBXSLT_VERSION)-fix.tar.gz
   cd libxslt-$(LIBXSLT_VERSION) && ./configure --with-libxml-src=../libxml2-$(LIBXML2_VERSION) -enable-shared=no CFLAGS=-DLIBXML_STATIC
   cd libxslt-$(LIBXSLT_VERSION) && make
   mkdir -p libs/include/libxslt && cp libxslt-$(LIBXSLT_VERSION)/libxslt/*.h libs/include/libxslt/
   cp libxslt-$(LIBXSLT_VERSION)/libxslt/.libs/libxslt.a libs/lib/
   cp libxslt-$(LIBXSLT_VERSION)/libexslt/.libs/libexslt.a libs/lib/
   rm -r -f libxml2-$(LIBXML2_VERSION)
   rm -r -f libxslt-$(LIBXSLT_VERSION)
   touch libxslt

curl-$(CURL_VERSION).tar.gz:
   curl.exe http://curl.haxx.se/download/curl-$(CURL_VERSION).tar.gz -o curl-$(CURL_VERSION).tar.gz

curl: curl-$(CURL_VERSION).tar.gz
   tar xvf curl-$(CURL_VERSION).tar.gz
   cd curl-$(CURL_VERSION) && LIBS="-L`pwd`/../libs/lib $$LIBS" && export LIBS && ./configure --disable-shared --with-ssl="`pwd`/../libs"
   #cd curl-$(CURL_VERSION) && make install exec_prefix="`pwd`/../libs"
   cd curl-$(CURL_VERSION) && make
   mkdir -p libs/include/curl && cp curl-$(CURL_VERSION)/include/curl/*.h libs/include/curl/
   cp curl-$(CURL_VERSION)/lib/.libs/libcurl.a libs/lib/
   rm -r -f curl-$(CURL_VERSION)
   touch curl

libssh-$(LIBSSH_VERSION).tar.gz:
   curl.exe -k https://red.libssh.org/attachments/download/41/libssh-0.5.4.tar.gz -o libssh-0.5.4.tar.gz

libssh: libssh-$(LIBSSH_VERSION).tar.gz
   tar xvf libssh-$(LIBSSH_VERSION).tar.gz
   tar xvf libssh-$(LIBSSH_VERSION)-fix.tar.gz
   mkdir -p libssh-$(LIBSSH_VERSION)/build
   cd libssh-$(LIBSSH_VERSION)/build && cmake .. -G"MSYS Makefiles" -DWITH_STATIC_LIB:BOOL=ON -DZLIB_LIBRARY:FILEPATH="`pwd`/../../libs/lib/libz.a" -DZLIB_INCLUDE_DIR:PATH="`pwd`/../../libs/include" -DOPENSSL_LIBRARIES:FILEPATH="`pwd`/../../libs/lib/libcrypto.a" -DOPENSSL_INCLUDE_DIRS:PATH="`pwd`/../../libs/include"
   cd libssh-$(LIBSSH_VERSION)/build && make
   cp libssh-$(LIBSSH_VERSION)/build/src/libssh.a libs/lib/
   cp libssh-$(LIBSSH_VERSION)/build/src/threads/libssh_threads.a libs/lib/
   mkdir -p libs/include/libssh && cp libssh-$(LIBSSH_VERSION)/include/libssh/*.h libs/include/libssh/
   rm -r -f libssh-$(LIBSSH_VERSION)
   touch libssh

protobuf-$(PROTOBUF_VERSION).tar.gz:
   curl.exe -k https://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz -o protobuf-2.4.1.tar.gz

protobuf: protobuf-$(PROTOBUF_VERSION).tar.gz
   tar xvf protobuf-$(PROTOBUF_VERSION).tar.gz
   cd protobuf-$(PROTOBUF_VERSION) && ./configure --disable-shared
   #cd protobuf-$(PROTOBUF_VERSION) && make install exec_prefix="`pwd`/../libs"
   cd protobuf-$(PROTOBUF_VERSION) && make
   mkdir -p libs/include/protobuf && cp -r protobuf-$(PROTOBUF_VERSION)/src/google/ libs/include/protobuf/
   cp protobuf-$(PROTOBUF_VERSION)/src/.libs/libprotobuf.a libs/lib/
   cp protobuf-$(PROTOBUF_VERSION)/src/protoc.exe libs/bin/
   rm -r -f protobuf-$(PROTOBUF_VERSION)
   touch protobuf

tcl$(TCL_VERSION)-src.tar.gz:
   curl.exe -L http://prdownloads.sourceforge.net/tcl/tcl$(TCL_VERSION)-src.tar.gz -o tcl$(TCL_VERSION)-src.tar.gz

sqlcipher-$(SQLCIPHER_VERSION).tar.gz:
   curl.exe -L -k https://github.com/sqlcipher/sqlcipher/archive/v$(SQLCIPHER_VERSION).tar.gz -o sqlcipher-$(SQLCIPHER_VERSION).tar.gz

sqlcipher: tcl$(TCL_VERSION)-src.tar.gz sqlcipher-$(SQLCIPHER_VERSION).tar.gz
   # tcl
   tar xvf tcl$(TCL_VERSION)-src.tar.gz
   mkdir -p tcl$(TCL_VERSION)/build
   cd tcl$(TCL_VERSION)/build && ../win/configure
   cd tcl$(TCL_VERSION)/build && make
   #sqlcipher
   tar xvf sqlcipher-$(SQLCIPHER_VERSION).tar.gz
   cd sqlcipher-$(SQLCIPHER_VERSION) && ln -s ../tcl$(TCL_VERSION)/build/tclsh86.exe tclsh
   mkdir -p tcl$(TCL_VERSION)/lib
   ln -s `pwd`/tcl$(TCL_VERSION)/library `pwd`/tcl$(TCL_VERSION)/lib/tcl8.6
   cd sqlcipher-$(SQLCIPHER_VERSION) && PATH=$$PATH:`pwd`/../tcl$(TCL_VERSION)/build && LIBS="-L`pwd`/../libs/lib -lgdi32 $$LIBS" && export LIBS && ./configure --disable-shared --enable-static --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -I`pwd`/../libs/include -I`pwd`/../tcl$(TCL_VERSION)/generic" LDFLAGS="-L`pwd`/../libs/lib -lcrypto -lgdi32" --with-tcl="`pwd`/../tcl$(TCL_VERSION)/build" && make install prefix="`pwd`/install"
   cp -r sqlcipher-$(SQLCIPHER_VERSION)/install/include/* libs/include/
   cp sqlcipher-$(SQLCIPHER_VERSION)/install/lib/libsqlcipher.a libs/lib/
   cp sqlcipher-$(SQLCIPHER_VERSION)/install/bin/sqlcipher.exe libs/bin/
   rm -r -f sqlcipher-$(SQLCIPHER_VERSION)
   rm -r -f tcl$(TCL_VERSION)
   touch sqlcipher


I then successfully compiled Retroshre, but i can't run it from within QT Creator. So I tried copying the EXE to a working Retroshre and I get the following error:
Restroshare1.PNG
NoDLL
Restroshare1.PNG (7.17 KiB) Viewed 2991 times


I then Copied the missing DLL to the folder and then get the following Error. This is where I am stuck now.
Capture2.PNG
DllERR
Capture2.PNG (9.2 KiB) Viewed 2991 times
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors

Postby NyvenZA » Sat Jul 04, 2015 5:44 am

Also tried to compile it in Debug mode and got this error:
Code: Select all
Test -d lib mkdir -p lib
/usr/bin/sh: line 0: test: too many arguments
Makefile.retroshare-gui.Debug:1067: recipe for target 'debug/RetroShare.exe' failed
mingw32-make[2]: *** [debug/RetroShare.exe] Error 2
mingw32-make[2]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop-Debug/retroshare-gui/src'
mingw32-make[1]: *** [debug] Error 2
Makefile.retroshare-gui:34: recipe for target 'debug' failed
mingw32-make[1]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop-Debug/retroshare-gui/src'
makefile:226: recipe for target 'sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered' failed
mingw32-make: *** [sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered] Error 2
07:37:08: The process "C:\Qt\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project RetroShare (kit: Desktop)
When executing step "Make"
07:37:08: Elapsed time: 03:31.
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors

Postby heini » Sat Jul 04, 2015 4:22 pm

NyvenZA wrote:Also tried to compile it in Debug mode and got this error:
Code: Select all
Test -d lib mkdir -p lib
/usr/bin/sh: line 0: test: too many arguments


The first line looks bogus to me. These are two commands that should be concatenated with an "||" (logical or), to check for existance of directory "lib" and create it if needed.

What shell are you compiling in? cmd.exe, mingw or cygwin?

BTW: Is that really an uppercase T in "Test"? Also looks strange to me, because the command name is "test".

Bye...

Dirk
heini
 
Posts: 59
Joined: Sun Feb 02, 2014 8:37 am

Re: Compiling in Windows: Errors

Postby NyvenZA » Sat Jul 04, 2015 5:46 pm

Hi,
The "Test" was supposed to be "test". I copied the text, but skipped the first character. Just typed it again. Didn't see it was lowercase.

I was using the Windows QTCreator shortcut.

I now also tried it from the MingW. with a Debug Compile.
Code: Select all
c:/Qt/4.8.6/bin/rcc.exe -name Posted_images ../../../trunk/retroshare-gui/src/gui/Posted/Posted_images.qrc -o temp/qrc/qrc_Posted_images.cpp
g++ -c -pipe -O0 -Wextra -g -frtti -fexceptions -mthreads -Wall -Wextra -DUNICODE -DRS_ENABLE_GXS -DRS_RELEASE_VERSION -DWINDOWS_SYS -DWIN32_LEAN_AND_MEAN -D_USE_32BIT_TIME_T -DQT_DLL -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I'../../../../4.8.6/include/QtUiTools' -I'../../../../4.8.6/include/QtCore' -I'../../../../4.8.6/include/QtNetwork' -I'../../../../4.8.6/include/QtGui' -I'../../../../4.8.6/include/QtXml' -I'../../../../4.8.6/include/QtScript' -I'../../../../4.8.6/include' -I'../../../trunk/retroshare-gui/src/retroshare-gui' -I'../../../trunk/retroshare-gui/src' -I'../../../libs/include' -I'../../../trunk/libretroshare/src' -I'../../../trunk/libresapi/src' -I'../../../../4.8.6/include/ActiveQt' -I'temp/moc' -I'temp/ui' -I'.' -I'../../../../4.8.6/mkspecs/win32-g++' -o temp/obj/qrc_Posted_images.o temp/qrc/qrc_Posted_images.cpp
windres --include-dir=C:/Qt/RetroShare/trunk/retroshare-gui/src/../../libretroshare/src -i ../../../trunk/retroshare-gui/src/gui/images/retroshare_win.rc -o temp/obj/retroshare_win_res.o --include-dir=./../../../trunk/retroshare-gui/src/gui/images -DUNICODE -DRS_ENABLE_GXS -DRS_RELEASE_VERSION -DWINDOWS_SYS -DWIN32_LEAN_AND_MEAN -D_USE_32BIT_TIME_T -DQT_DLL -DQT_SCRIPT_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT
test -d lib mkdir -p lib
/usr/bin/sh: line 0: test: too many arguments
Makefile.retroshare-gui.Debug:1067: recipe for target 'debug/RetroShare.exe' failed
mingw32-make[2]: *** [debug/RetroShare.exe] Error 2
mingw32-make[2]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop_MinGW-Debug/retroshare-gui/src'
Makefile.retroshare-gui:34: recipe for target 'debug' failed
mingw32-make[1]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop_MinGW-Debug/retroshare-gui/src'
mingw32-make[1]: *** [debug] Error 2
makefile:226: recipe for target 'sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered' failed
mingw32-make: *** [sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered] Error 2
19:41:14: The process "C:\Qt\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project RetroShare (kit: Desktop-MinGW)
When executing step "Make"
19:41:14: Elapsed time: 12:05.


Tried MingW Release compile next.

Code: Select all
c:/Qt/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin/mingw32-make -f Makefile.retroshare-gui.Release
mingw32-make[2]: Entering directory 'c:/Qt/RetroShare/build-RetroShare-Desktop_MinGW-Release/retroshare-gui/src'
test -d lib mkdir -p lib
/usr/bin/sh: line 0: test: too many arguments
Makefile.retroshare-gui.Release:1067: recipe for target 'release/RetroShare.exe' failed
mingw32-make[2]: *** [release/RetroShare.exe] Error 2
mingw32-make[2]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop_MinGW-Release/retroshare-gui/src'
mingw32-make[1]: *** [release] Error 2
Makefile.retroshare-gui:34: recipe for target 'release' failed
mingw32-make[1]: Leaving directory 'c:/Qt/RetroShare/build-RetroShare-Desktop_MinGW-Release/retroshare-gui/src'
makefile:226: recipe for target 'sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered' failed
mingw32-make: *** [sub-retroshare-gui-src-retroshare-gui-pro-make_default-ordered] Error 2
19:58:03: The process "C:\Qt\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0\mingw32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project RetroShare (kit: Desktop-MinGW)
When executing step "Make"
19:58:03: Elapsed time: 00:04.
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Re: Compiling in Windows: Errors (Fixed)

Postby NyvenZA » Sun Jul 05, 2015 11:51 am

Ok, Found the issue.
I had copied the incorrect libstdc++6.dll. I copied the correct one from my compiler folder and the error disappeared.
BTW, I used a utility call "Dependacy Walker" to trace the issue. It showed that the DLL was there, but the entry points/functions required, where not there.

I could then start RS.
NyvenZA
 
Posts: 20
Joined: Mon Mar 05, 2012 4:49 pm

Next

Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 1 guest