-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Сannot compile lpng1638 and older #459
Comments
There is no such thing as |
I download the source from here: https://libpng.sourceforge.io/ |
I need more context information, because I cannot deduce anything from what you reported so far. The origin is intact. I was asking about your source, on your machine. What's in your scripts/options.awk, at line 10? Also, on what operating system are you building? Also, what's your build command? Etc. The correct content of scripts/options.awk is this: As you can see, there is no |
I configure with CMake, specifying only BUILD_TYPE, INSTALL_PREFIX and the path to my zlib build. Then I run make and make install. OS - Manjaro Linux (GCC and Mingw-w64). Version 1.6.37 was built without problems. Here is the full text of the error: [ 1%] Generating pnglibconf.c make[2]: *** [CMakeFiles/pnglibconf_c.dir/build.make:75: pnglibconf.c] Ошибка 1 |
The file options.awk is generated by CMake in the folder "Build", and the source I download from here: |
If you do not create the "Build" directory, but compile the library into the source folder, nothing changes, the same error results. |
@cosmin: options.awk is the name of the source file (scripts/options.awk) which is reporting the error. You will deduce that I wrote that file. You are looking at an error message: options.awk has detected an error at line "10" of the input. Not line 10 of options.awk (think compiler error messages). So search for "bad line" in scripts/options.awk; my code was somewhat terse. The error message is at line 500. The comments above may help. Since it is NR==10 then it's pretty soon into the parse. Shouldn't be hard to find, not. |
I don't know for sure exactly what command cmake is running but, assuming "scripts/gensrc.cmake" is the same as "scripts/gensrc.cmake.in" the first, preprocessing, command (which generates pnglibconf.tf4 apparently succcessfully) is something like:
Then the one which is failing (as reported by cmake in the OP) will be:
So it would be around line 10 of pnglibconf.tf4 and, since that is derived from scripts/pnglibconf.dfa, that makes sense as line 9 is "version" and both 8 and 10 are "com" (as in comment). The easiest way to discover what is going on is for @DaniilPetrov to supply pnglibconf.tf4 and, to be safe, pngconf.h and pnglibconf.tf5 (they should all be in ${SRCDIR}). There's something weird about the "com" handling (line 203 of scripts/options.awk). It looks like the match is failing. My guess is that the version number line in pngconf.h has a weird line ending but nothing else does, so line 120 of scripts/options.awk ends up with "version" being something that ends in a spurious control character, causing the next line (10) to have something invisible prepended to the "com". I note that some parts of CMakeLists.txt are apparently trying to do crlf->lf conversion and I note that LANG is set to, I think, "ru". Either could cause problems if it isn't just something weird in the version number from pngconf.h It should be obvious from a careful examination of pnglibconf.tf4, I suggest using od -c |
[ 1%] Generating pnglibconf.c
options.awk: bad line (10): com
CMake Error at scripts/gensrc.cmake:68 (message):
Failed to generate pnglibconf.tf5
The text was updated successfully, but these errors were encountered: