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

flex 2.6.3 breaks compiling binutils. #154

Closed
ht990332 opened this issue Jan 6, 2017 · 10 comments
Closed

flex 2.6.3 breaks compiling binutils. #154

ht990332 opened this issue Jan 6, 2017 · 10 comments

Comments

@ht990332
Copy link

ht990332 commented Jan 6, 2017

I get the following error:
make[2]: Entering directory '/home/hussam/cache/binutils/src/binutils-build/binutils'
gcc -march=x86-64 -mtune=native -O2 -pipe -fstack-protector-strong -Wl,-O1,--sort-common,--as-needed,-z,relro -o sysinfo sysinfo.o syslex_wrap.o
syslex_wrap.o: In function yylex': syslex_wrap.c:(.text+0xc63): undefined reference to yywrap'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1370: sysinfo] Error 1
make[2]: Leaving directory '/home/hussam/cache/binutils/src/binutils-build/binutils'
make[1]: *** [Makefile:3612: all-binutils] Error 2
make[1]: Leaving directory '/home/hussam/cache/binutils/src/binutils-build'

Reverting to 2.6.1 fixes it.

@westes
Copy link
Owner

westes commented Jan 7, 2017

What about 2.6.2?

@ht990332
Copy link
Author

ht990332 commented Jan 7, 2017

2.6.2 lets binutils compile correctly.

@nvinson
Copy link

nvinson commented Jan 13, 2017

@Hussamt Could you state which version of binutils you're trying to build? I am not able to repeat this issue with binutils-2.25.1, binutils-2.26, or binutils-2.27. I also have not seen it in Gentoo's tracker for this issue (https://bugs.gentoo.org/show_bug.cgi?id=598186)

@ht990332
Copy link
Author

ht990332 commented Jan 13, 2017

Hi nvinson. I compile binutils from 2.27 branch.
https://sourceware.org/git/?p=binutils-gdb.git;a=shortlog;h=refs/heads/binutils-2_27-branch

@nvinson
Copy link

nvinson commented Jan 13, 2017

Thanks. I was able to reproduce it now.

In syslex.l I see

#ifndef yywrap
static int yywrap (void) { return 1; }
#endif

Which will prevent yywrap from being defined in flex-2.6.3. The source file syslex.c is not regenerated when building from the binutils-2.27 release tarball, which is why I didn't see it in my attempts to reproduce.

@jgalar
Copy link

jgalar commented Jan 13, 2017

Building Babeltrace 1.5.x fails with a similar error:
https://gist.github.com/jgalar/a4c447e8291264e5d8acc0a3165d2e14

@westes
Copy link
Owner

westes commented Jan 23, 2017

Looks like the same issue as #162; please confirm that you see this fixed for you on master now.

@ht990332
Copy link
Author

I can compile binutils again using flex from git master branch. Thank you

@jgalar
Copy link

jgalar commented Feb 18, 2017

Just wondering if there is an ETA available for a 2.6.4 release?

Arch Linux (maybe others?) is distributing 2.6.3 which is forcing users to downgrade flex in order to build a number of packages.

@mrcmunir
Copy link

mrcmunir commented Feb 18, 2017

@jgalar If use Arch linux use flex-git from aur https://aur.archlinux.org/packages/flex-git/

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

No branches or pull requests

5 participants