OpenVPN / openvpn-build

OpenVPN Build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot build v2.5.1 due to a missing lz4.h file

dmilojevic opened this issue · comments

Hi. I am trying to build the current (2.5.1) version of openvpn by following simple instructions at https://community.openvpn.net/openvpn/wiki/BuildingUsingMsvcBuildsystem.

All of the components should be properly in place (Visual Studio, Nasm, Perl).

After executing build.bat, the process breaks at openvpn part with the following error reported:

"c:\Temp\ovpn\openvpn-build-openvpn\openvpn.sln" (default target) (1) ->
"c:\Temp\ovpn\openvpn-build-openvpn\src\openvpn\openvpn.vcxproj" (default target) (4) ->
(ClCompile target) ->
  c:\Temp\ovpn\openvpn-build-openvpn\src\openvpn\comp-lz4.c(34,10): fatal error C1083: Cannot open include file: 'lz4.h
': No such file or directory [c:\Temp\ovpn\openvpn-build-openvpn\src\openvpn\openvpn.vcxproj]

I retried the build but the result was the same.
Couldn't find anything about this anywhere else so I hope someone here could advise what to do.

I tried also to download lz4 source and put it in the includes folder but that led to some other issues (about couple unresolved lz4-related symbols). It's a bit over my head to solve it myself, unfortunately.

Thanks for your help in advanace!

Thank you so much for that question! :)

I have downloaded now the 2.5.1 release of openvpn-build and a release 2.5.1 of openvpn source and rerun the build. I encountered the identical error.

Edit: I just inspected the build.bat and build-env.bat and realized the process a bit better. Let me modify few things there and report back if it builds ok.

Edit2: Once I changed the openvpn version in the build-env.bat file (and adjusted the url), it worked. Sorry for creating this ticket. Maybe I should have been aware of this since the beginning.

Thanks one more time for the help!

Hi,
On Tue, Mar 23, 2021 at 06:51:37AM -0700, dmilojevic wrote: Closed #207.
Uh, why? Found the issue?

You suggested that 2.5.1 should build without any issues. On the other hand you suggested that in the master branch a work has been started to remove bundeled lz4. That nudged me in the right direction. I realized that you actually control these details through the build-env.bat file. When I updated it to get v2.5.1 of openvpn, instead of the current master branch (which is ahead of 2.5.1), the build went through.
Sorry, I thought I was clearly explaining this with my sendond edit before I closed the ticket.