From: Diaa S. <dia...@gm...> - 2008-02-16 17:16:25
|
Hi, I was compiling OpenVPN 2.1rc7 on Windows(MinGW) and I did it successfully after 2 days of trying. This is a list of the issues I met, I thought I should tell you so that you can fix or mention them at least to make building easier: * The current latest version of PKCS11-helper(which is 1.05) doesn't produce a DLL when compiled using MinGW, although the DLL is needed for building OpenVPN successfully, (I just used the DLL from the binary distribution so that the build will succeed without having to modify the installer) * In the compilation command, although PKCS-helper depends on OpenSSL, it comes after it in the libraries(I had to fix this by modifying the makefile) * After compiling OpenSSL 0.9.7m, it's necessary to copy all files matching incout\openssl\* to include\openssl\* * The source tree must reside under the same drive as WINDDK(which is hardcoded as C:\) Regards, Diaa Sami |
From: Alon Bar-L. <alo...@gm...> - 2008-02-16 17:25:13
|
I can't help you with the none standard build system of OpenVPN and dependencies. But I can help with the pkcs11-helper issue. Can you please provide config.log of that build? Alon. On 2/16/08, Diaa Sami <dia...@gm...> wrote: > Hi, > I was compiling OpenVPN 2.1rc7 on Windows(MinGW) and I did it > successfully after 2 days of trying. > This is a list of the issues I met, I thought I should tell you so > that you can fix or mention them at least to make building easier: > * The current latest version of PKCS11-helper(which is 1.05) doesn't > produce a DLL when compiled using MinGW, although the DLL is needed > for building OpenVPN successfully, (I just used the DLL from the > binary distribution so that the build will succeed without having to > modify the installer) > * In the compilation command, although PKCS-helper depends on OpenSSL, > it comes after it in the libraries(I had to fix this by modifying the > makefile) > * After compiling OpenSSL 0.9.7m, it's necessary to copy all files > matching incout\openssl\* to include\openssl\* > * The source tree must reside under the same drive as WINDDK(which is > hardcoded as C:\) > > Regards, > Diaa Sami > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Openvpn-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openvpn-devel > |
From: James Y. <ji...@yo...> - 2008-02-18 18:21:39
|
The latest Windows build system for OpenVPN is actually quite powerful, and can autodetect when certain dependencies are missing, such as the Windows DDK, and substitute in a pre-built binary of the driver, instead of requiring that every component be built from source. This means, for example, that if you just want to make a simple change to the NSIS script, you don't need to have the DDK installed or build OpenSSL, lzo, or PKCS11-Helper. To build OpenVPN for Windows, use the ./domake-win script. This script has extensive comments, and describes how to use the pre-built binaries feature, where pre-built binaries are substituted at every build step where a lack of dependencies precludes a build from source. You can also view the ./domake-win script here: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn/domake-win For example, suppose you want to build a windows installer for OpenVPN that includes a custom configuration file and keys. Here is a quick-start guide: (1) Install the minimum tool chain: # MinGW -- for GNU C compiler # MSYS -- for bash # msysDTK -- for perl # NSIS -- for building installer (2) Download and expand the prebuilt binaries distribution, for example: https://secure.openvpn.net/devel/openvpn-2.1_rc7a-prebuilt.tbz (3) In the top-level directory of the prebuilt-binary distribution, download and expand a source .tar.gz file, for example: https://secure.openvpn.net/devel/openvpn-2.1_rc7a.tar.gz Edit install-win32/settings.in, uncommenting out these lines, and setting them to the appropriate file names: # include a sample configuration file and key ;!define SAMPCONF_DIR "test-key" ;!define SAMPCONF_CONF "test.ovpn" ;!define SAMPCONF_P12 "test.p12" ;!define SAMPCONF_TA "ta.key" In the commented-out example above, the test-key directory should be present in the prebuilt-binaries top-level directory (the parent directory of the source distribution), and should contain the files test.ovpn, test.p12, ta.key. Now you should be able to build an installer with ./domake-win that includes these custom configuration files, such that when the installer is run by an end-user, these files are placed into \program files\openvpn\config James |
From: Diaa S. <dia...@gm...> - 2008-02-16 17:57:23
Attachments:
config.log.bz2
|
Alon Bar-Lev wrote: > I can't help you with the none standard build system of OpenVPN and > dependencies. Why is this a non-standard build system, I thought it was. if it isn't then what's the standard build system for Windows? > But I can help with the pkcs11-helper issue. > > Can you please provide config.log of that build? please find it attached Thanks |
From: Alon Bar-L. <alo...@gm...> - 2008-02-16 18:14:04
|
On 2/16/08, Diaa Sami <dia...@gm...> wrote: > Alon Bar-Lev wrote: > > I can't help you with the none standard build system of OpenVPN and > > dependencies. > > Why is this a non-standard build system, I thought it was. > if it isn't then what's the standard build system for Windows? Should be one autoconf/automake for all platforms. But James rejects this. > > But I can help with the pkcs11-helper issue. > > > > Can you please provide config.log of that build? > > please find it attached > I see nothing wrong here... Can you please remove ac_cv_type_size_t=no and --disable-static from configure? And also end me the complete build log? Thanks! Alon. |
From: Diaa S. <dia...@gm...> - 2008-02-16 23:07:18
Attachments:
config.log.bz2
build.log.bz2
|
On Feb 16, 2008 8:14 PM, Alon Bar-Lev <alo...@gm...> wrote: > > I see nothing wrong here... > Can you please remove ac_cv_type_size_t=no and --disable-static from configure? > And also end me the complete build log? > I did and here are the new config.log and build output |
From: Alon Bar-L. <alo...@gm...> - 2008-02-17 06:32:05
|
Thanks! I solved something similar to this using a cross compiler, with newer gcc than I used in msys. Can you please try this one? http://alon.barlev.googlepages.com/pkcs11-helper-1.06_beta1.tar.bz2 If it does not work, please provide a full build log again... The linker cannot find proper libraries. Also, if I remember correctly, you need to reference the DLL and not the lib, modify: OPENSSL_LIBS=-L/c/openvpn_job/openssl-0.9.7m-patched/out/ -leay32 -lssl32 to: OPENSSL_LIBS=-L/c/openvpn_job/openssl-0.9.7m-patched/ -leay32 -lssl32 Thanks! On 2/17/08, Diaa Sami <dia...@gm...> wrote: > On Feb 16, 2008 8:14 PM, Alon Bar-Lev <alo...@gm...> wrote: > > > > I see nothing wrong here... > > Can you please remove ac_cv_type_size_t=no and --disable-static from configure? > > And also end me the complete build log? > > > > I did and here are the new config.log and build output > > |
From: Diaa S. <dia...@gm...> - 2008-02-17 18:46:20
Attachments:
config.log.bz2
build.log.bz2
|
I tried this one but it's the same, no DLL is created even after linking with the DLLs instead of the the libs. Here are the new config.log and build.log so you can find what's wrong. On 2/17/08, Alon Bar-Lev <alo...@gm...> wrote: > Thanks! > I solved something similar to this using a cross compiler, with newer > gcc than I used in msys. > > Can you please try this one? > http://alon.barlev.googlepages.com/pkcs11-helper-1.06_beta1.tar.bz2 > > If it does not work, please provide a full build log again... The > linker cannot find proper libraries. > > Also, if I remember correctly, you need to reference the DLL and not > the lib, modify: > OPENSSL_LIBS=-L/c/openvpn_job/openssl-0.9.7m-patched/out/ -leay32 -lssl32 > to: > OPENSSL_LIBS=-L/c/openvpn_job/openssl-0.9.7m-patched/ -leay32 -lssl32 > > Thanks! > > On 2/17/08, Diaa Sami <dia...@gm...> wrote: > > On Feb 16, 2008 8:14 PM, Alon Bar-Lev <alo...@gm...> wrote: > > > > > > I see nothing wrong here... > > > Can you please remove ac_cv_type_size_t=no and --disable-static from configure? > > > And also end me the complete build log? > > > > > > > I did and here are the new config.log and build output > > > > > |
From: Alon Bar-L. <alo...@gm...> - 2008-02-17 20:48:11
|
On Feb 17, 2008 8:46 PM, Diaa Sami <dia...@gm...> wrote: > I tried this one but it's the same, no DLL is created even after > linking with the DLLs instead of the the libs. > > Here are the new config.log and build.log so you can find what's wrong. Thanks! First, you don't need the -lssl32 for pkcs11-helper. But it still does not find libeay32.dll... Do you sure the openssl is built correctly? Do you have libeay32.dll at "/c/openvpn_job/openssl-0.9.7m-patched"? What is the output of "file" command on libeay32.dll? Alon. |
From: Diaa S. <dia...@gm...> - 2008-02-18 00:19:13
|
On Feb 17, 2008 10:48 PM, Alon Bar-Lev <alo...@gm...> wrote: > On Feb 17, 2008 8:46 PM, Diaa Sami <dia...@gm...> wrote: > > I tried this one but it's the same, no DLL is created even after > > linking with the DLLs instead of the the libs. > > > > Here are the new config.log and build.log so you can find what's wrong. > > Thanks! > First, you don't need the -lssl32 for pkcs11-helper. > > But it still does not find libeay32.dll... I think it's something with linking with DLLs, unfortunately I didn't do it before on MinGW but on VC you only link to the import library not the DLL itself. > Do you sure the openssl is built correctly? Yes, because the static version of pkcs-helper builds successfully and I used it to build openvpn successfully. > Do you have libeay32.dll at "/c/openvpn_job/openssl-0.9.7m-patched"? > What is the output of "file" command on libeay32.dll? Yes, the output of file is Ok as far as I can see, it's ../openssl-0.9.7m-patched/libeay32.dll; MS-DOS executable PE for MS Windows (DLL) (console) Intel 80386 32-bit |
From: Alon Bar-L. <alo...@gm...> - 2008-02-18 05:59:29
|
I wish to reproduce this. Can you please provide some instruction of how to do this? 1. Which EXACT version and platform of Windows are you using? 2. Which mingw version you are using, how did you installed it. 3. Which msys version are you using, how did you installed it. 4. How did you EXACTLY compile OpenSSL? Thanks! On 2/18/08, Diaa Sami <dia...@gm...> wrote: > On Feb 17, 2008 10:48 PM, Alon Bar-Lev <alo...@gm...> wrote: > > On Feb 17, 2008 8:46 PM, Diaa Sami <dia...@gm...> wrote: > > > I tried this one but it's the same, no DLL is created even after > > > linking with the DLLs instead of the the libs. > > > > > > Here are the new config.log and build.log so you can find what's wrong. > > > > Thanks! > > First, you don't need the -lssl32 for pkcs11-helper. > > > > But it still does not find libeay32.dll... > > I think it's something with linking with DLLs, unfortunately I didn't > do it before on MinGW > but on VC you only link to the import library not the DLL itself. > > > Do you sure the openssl is built correctly? > > Yes, because the static version of pkcs-helper builds successfully and > I used it to build openvpn successfully. > > > Do you have libeay32.dll at "/c/openvpn_job/openssl-0.9.7m-patched"? > > What is the output of "file" command on libeay32.dll? > > Yes, the output of file is Ok as far as I can see, it's > ../openssl-0.9.7m-patched/libeay32.dll; MS-DOS executable PE for MS > Windows (DLL) (console) Intel 80386 32-bit > |
From: Diaa S. <dia...@gm...> - 2008-02-18 11:41:41
|
On Feb 18, 2008 7:59 AM, Alon Bar-Lev <alo...@gm...> wrote: > I wish to reproduce this. > Can you please provide some instruction of how to do this? > 1. Which EXACT version and platform of Windows are you using? Windows XP SP2 Home edition > 2. Which mingw version you are using, how did you installed it. The current latest, there's no single version for the whole package but gcc -v gives ---- Reading specs from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.5 (mingw special) ---- I installed MinGW manually by unpacking .tar.gz packages in c:/MinGW > 3. Which msys version are you using, how did you installed it. 1.0.10, installed using the installer provided at mingw.org > 4. How did you EXACTLY compile OpenSSL? Patched it using the patch provided with openvpn, then ran ms\mw.bat Thanks |