It looks like there is an error when trying to build libpng with VS2015. This happens if we try to create it with NMake or VS.
To replicate this error you need to open CMakeLists in cmake,
select Visual Studio 14 2015 Win64 as the project. Configure and Generate.
After opening the created project in VS and running Build I get the following:
3> Building Custom Rule D:/Development/TheConstructExt/ExtSrc/lpng1628/CMakeLists.txt
3> CMake does not need to re-run because D:\Development\TheConstructExt\ExtSrc\lpng1628\CMakeFiles\generate.stamp is up-to-date.
3> Generating pnglibconf.c
3> gawk: D:/Development/TheConstructExt/ExtSrc/lpng1628/scripts/options.awk:169: (FILENAME=D:/Development/TheConstructExt/ExtSrc/lpng1628/scripts/pnglibconf.dfa FNR=891) fatal: cannot open file `D:/Development/TheConstructExt/ExtSrc/lpng1628/pngusr.dfa' for reading (No such file or directory)
3>
3> CMake Error at scripts/gensrc.cmake:60 (message):
3> Failed to generate pnglibconf.tf4
3>
3>
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code 1.
it looks like the file pngusr.dfa is not in the lpng1628 folder at all. Instead it is in folders that are located in lpng1628\contrib\pngminim
Any help from the comunity would be greatly apreciated.
Don't use the pngusr.dfa in contrib/pngminim; that is an example of building a stripped-down libpng.
Right, I figured it was just an example for something. I guess that file
should be in the root folder, is it missing?
Or maybe it should be auto generated?
On Tue, Jan 31, 2017 at 11:46 AM, MAS dieslower@users.sf.net wrote:
--
Maxim Serebrennik
Sr Software Enginneer | Leidos
C (201) 686-8809
Normally we use the one in the scripts directory (scripts/pnglibconf.dfa)
If I copy pnglibconf.dfa to the root folder and rename it to pngusr.dfa I get the following errors:
They happen with almost every .c file
Also, I just looked at the code base, and it looks like the libpng16 branch has the pngusr.dfa in its root, and the libpng-1.6.28-signed tag does not....
I tried to build the libpng16 branch just as i did the tag, and the branch built just fine.
Is there some huge difference between the two?
Last edit: Maxim S 2017-01-31
That looks like some mistake in my release script, thanks.
No problem! Glad I could help :)
I'll look into that. But meanwhile, you can try using scripts/pnglibconf.h.prebuilt (just copy it into your build directory and call it pnglibconf.h)
EDIT: Oh, don't call pnglibconf.dfa pngusr.dfa, pngusr.dfa is your own dfa not the system one.
So the question isn't why is pngusr.dfa missing, but why is your compiler asking for one?
As I understand it, the compiler should only look for one if you've configured DFA_EXTRA.
Last edit: Glenn Randers-Pehrson 2017-01-31
Maybe there is some error in the cmake script?
In the configuration I leave DFZ_EXTRA blank, or whatever the default is.
Last edit: Maxim S 2017-01-31
Glenn,
If you let me know when you commit the fix, and into which version, I cant test it out to confirm it...
quick fix. set AWK path as Blank. then CMAKE will use prebuilt header.
Are you still seeing this problem in libpng-1.6.30?
Just did a build and it worked like a charm out of the box!
What is the difference between 1.6.30 signed and master signed?
I tried the signed version, not the master....
On Thu, Jun 29, 2017 at 7:28 AM, Glenn Randers-Pehrson <glennrp@users.sf.net
--
Maxim Serebrennik
Sr Software Enginneer | Leidos
C (201) 686-8809
I'm experiencing the same problem using lpng1631.zip. I worked around it by setting AWK to an empty value as suggested above, but it would be better if this could be skipped in furture versions.