86 | | ''In theory'' this should work. However, you'll most likely encounter issues with (trivial?) compiler warnings stopping the entire build. To circumvent this remove the ''/WX'' flag in the makefile as suggested in ''INSTALL.W32'' file. This is harder than it seems for two reasons: |
87 | | |
88 | | * The correct makefile is ''ms\ntdll.mak'' (not the ''Makefile'' in build root) |
89 | | * You need to use ''Wordpad'' or other UNIX linefeed-aware editor to open and save the makefile |
90 | | |
91 | | You may also encounter issues with an incorrect target processor architecture being used by the linker, especially if you're building OpenVPN on a virtual machine: |
92 | | |
93 | | {{{ |
94 | | fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' |
95 | | }}} |
96 | | |
97 | | You can check the processor architecture with a tool like [http://www.gtopala.com/ SIW]. Once you know the proper target architecture you need to define it manually. If you have integrated OpenVPN to Visual Studio's graphical development environment, you can set in project properties. If you're just running the VC command-line tools, you can either append the correct architecture via [http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx linker options] to the build command-line or define it in environment variables: |
98 | | |
99 | | * http://msdn.microsoft.com/en-us/library/wk97ab1b%28v=VS.80%29.aspx |
100 | | * http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx |
101 | | |
| 134 | = Troubleshooting = |
| 135 | |
| 136 | == Compiler warnings during OpenSSL build == |
| 137 | |
| 138 | When building OpenSSL you're most likely encounter issues with trivial compiler warnings stopping the entire build. To circumvent this remove the ''/WX'' flag in the makefile as suggested in ''INSTALL.W32'' file. This is harder than it seems for two reasons: |
| 139 | |
| 140 | * The correct makefile is ''ms\ntdll.mak'' (not the ''Makefile'' in build root) |
| 141 | * You need to use ''Wordpad'' or other UNIX linefeed-aware editor to open and save the makefile |
| 142 | |
| 143 | == Wrong processor architecture during OpenSSL build == |
| 144 | |
| 145 | Second problem you may encounter is incorrect target processor architecture being used by the linker: |
| 146 | |
| 147 | {{{ |
| 148 | fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' |
| 149 | }}} |
| 150 | |
| 151 | You can check the correct processor architecture with a tool like [http://www.gtopala.com/ SIW]. Once you know the proper target architecture you need to define it manually. If you have integrated OpenVPN to Visual Studio's graphical development environment, you can set in project properties. If you're just running the VC command-line tools, you can either append the correct architecture via [http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx linker options] to the build command-line or define it in environment variables: |
| 152 | |
| 153 | * http://msdn.microsoft.com/en-us/library/wk97ab1b%28v=VS.80%29.aspx |
| 154 | * http://msdn.microsoft.com/en-us/library/y0zzbyt4%28v=VS.80%29.aspx |
| 155 | |
| 156 | Probably the easiest fix is to set the environment variable from the command-line: |
| 157 | |
| 158 | {{{ |
| 159 | c:\openssl-0.9.8o> set LINK=/MACHINE:x86 |
| 160 | }}} |
| 161 | |
| 162 | == Linker can't find link.obj == |
| 163 | |
| 164 | During OpenSSL build the linker will look for object files from directories specified by environment variable ''TMP'' or ''TEMP''. By default, both are set to ''%USERPROFILE%\Local Settings\Temp''. However, if you have Cygwin installed, the chances are that it has a different idea about where to put temporary files. You can verify this with the ''env'' command: |
| 165 | |
| 166 | {{{ |
| 167 | c:\openssl-0.9.8o> env |
| 168 | --- SNIP --- |
| 169 | |
| 170 | TMP=/tmp |
| 171 | TEMP=/tmp |
| 172 | |
| 173 | --- SNIP --- |
| 174 | |
| 175 | TERM=cygwin |
| 176 | }}} |
| 177 | |
| 178 | Unfortunately these environment variables can't be set manually with ''set'' command. |
| 179 | |
| 180 | |