Skip to content
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

Unable to build (rgblink) on Fedora 26 #207

Closed
tobiasvl opened this issue Oct 27, 2017 · 5 comments
Closed

Unable to build (rgblink) on Fedora 26 #207

tobiasvl opened this issue Oct 27, 2017 · 5 comments

Comments

@tobiasvl
Copy link
Member

@tobiasvl tobiasvl commented Oct 27, 2017

I'm trying to build rgbds v0.3.3 on Fedora 26, but it seems to have trouble with flex. The readme doesn't say anything about versions requirements of dependencies, but I have these installed:

  • byacc-1.9.20170201-1.fc26.src.rpm
  • flex-2.6.1-3.fc26.src.rpm
  • libpng-dev seems to be libpng-1.6.28-2.fc26.src.rpm from the package libpng-devel
    • pkg-config --cflags libpng says -I/usr/include/libpng16

Building gives the following verbose error:

tvl@rocinante:~/src/rgbds $ make Q=
yacc -d  -o src/asm/asmy.c src/asm/asmy.y
yacc: 2 shift/reduce conflicts, 3 reduce/reduce conflicts.
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/asmy.o src/asm/asmy.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/charmap.o src/asm/charmap.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/fstack.o src/asm/fstack.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/globlex.o src/asm/globlex.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/lexer.o src/asm/lexer.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/main.o src/asm/main.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/math.o src/asm/math.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/output.o src/asm/output.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/rpn.o src/asm/rpn.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/symbol.o src/asm/symbol.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/asm/locallex.o src/asm/locallex.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/extern/err.o src/extern/err.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/extern/reallocarray.o src/extern/reallocarray.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/extern/strlcpy.o src/extern/strlcpy.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/extern/strlcat.o src/extern/strlcat.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/extern/version.o src/extern/version.c
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" -o rgbasm src/asm/asmy.o src/asm/charmap.o src/asm/fstack.o src/asm/globlex.o src/asm/lexer.o src/asm/main.o src/asm/math.o src/asm/output.o src/asm/rpn.o src/asm/symbol.o src/asm/locallex.o src/extern/err.o src/extern/reallocarray.o src/extern/strlcpy.o src/extern/strlcat.o src/extern/version.o -lm
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" `pkg-config --static --cflags libpng` -c -o src/link/assign.o src/link/assign.c
yacc -d  -o src/link/parser.c src/link/parser.y
rm -rf src/link/lexer.c
flex --nounistd -o src/link/lexer.c src/link/lexer.l
flex: fatal internal error, exec failed
make: *** [Makefile:110: src/link/lexer.o] Broken pipe

v0.2.5 and earlier successfully build, which makes sense, because that's also the version Fedora 26 has available in DNF. v0.3.0 gives the same error as above, except that the final line references Makefile:98 instead, and ditto for v0.3.1 and v0.32, but those reference Makefile:108.

The problem seems to be rgblink. All targets are built OK except that one. When I try to just make rgblink, the following error occurs:

tvl@rocinante:~/src/rgbds $ make Q= rgblink
cc -g -Wall -Werror -std=c99 -D_POSIX_C_SOURCE=200809L -Iinclude -DBUILD_VERSION_STRING=\"`git describe --tags --dirty --always 2>/dev/null`\" -o rgblink src/link/assign.o src/link/lexer.o src/link/library.o src/link/main.o src/link/mapfile.o src/link/object.o src/link/output.o src/link/patch.o src/link/parser.o src/link/script.o src/link/symbol.o src/extern/err.o src/extern/version.o
src/link/assign.o: In function `AssignSections':
/home/tvl/src/rgbds/src/link/assign.c:449: undefined reference to `script_Parse'
src/link/parser.o: In function `yywrap':
/home/tvl/src/rgbds/src/link/parser.y:108: undefined reference to `script_IncludeDepthGet'
/home/tvl/src/rgbds/src/link/parser.y:111: undefined reference to `script_IncludePop'
src/link/parser.o: In function `yyerror':
parser.c:(.text+0x3e): undefined reference to `script_fatalerror'
src/link/parser.o: In function `yyparse':
parser.c:(.text+0x235): undefined reference to `yylex'
parser.c:(.text+0x68b): undefined reference to `script_fatalerror'
parser.c:(.text+0x69a): undefined reference to `script_fatalerror'
parser.c:(.text+0x6df): undefined reference to `script_fatalerror'
parser.c:(.text+0x700): undefined reference to `script_fatalerror'
parser.c:(.text+0x720): undefined reference to `script_IncludeFile'
parser.c:(.text+0x830): undefined reference to `yylex'
collect2: error: ld returned 1 exit status
make: *** [Makefile:95: rgblink] Error 1

The problem here might just be a WONTFIX telling me that I need newer versions of the dependencies (although newer versions of flex aren't all over the place), but it's hard to know what's required when there are no minimum version requirements anywhere in the docs.

@tobiasvl tobiasvl changed the title Unable to build rgbds Unable to build (rgblink) on Fedora 26 Oct 28, 2017
@tobiasvl
Copy link
Member Author

@tobiasvl tobiasvl commented Nov 7, 2017

Just so I'm clear: I don't expect anyone to fix Fedora here, but it's hard for me to fix it too since rgbds doesn't mention what versions it depends on!

@tobiasvl
Copy link
Member Author

@tobiasvl tobiasvl commented Nov 7, 2017

Seems unlikely to be outdated package versions. Someone in #gbdev successfully built v0.3.3 on CentOS 7 with the following dependency versions:

flex-2.5.37-3.el7.x86_64
libpng-1.5.13-7.el7_2.x86_64
libpng12-devel-1.2.50-10.el7.x86_64
libpng12-1.2.50-10.el7.x86_64
byacc-1.9.20130304-3.el7.x86_64`
@tobiasvl tobiasvl closed this Nov 7, 2017
@tobiasvl
Copy link
Member Author

@tobiasvl tobiasvl commented Nov 7, 2017

Solved this… Somehow. I built a new flex toolchain.

@AntonioND
Copy link
Member

@AntonioND AntonioND commented Nov 7, 2017

Just for the record, you're not the first one to have problems with flex and the differences there are between versions... I have flex 2.6.1 and byacc - 1.9 20140715.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants