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

make test fails with USE_PCRE=true #7

Open
GaidaiIgor opened this issue Sep 2, 2020 · 2 comments
Open

make test fails with USE_PCRE=true #7

GaidaiIgor opened this issue Sep 2, 2020 · 2 comments

Comments

@GaidaiIgor
Copy link

GaidaiIgor commented Sep 2, 2020

I cloned the repo and ran make test with no options. The output of this command is attached. As you can see, tests is compiled and linked successfully, but then fails at runtime. The exact same sequence of actions on another machine works with no issues. Running make test USE_PCRE=false works with no issues.

One suspicious thing I've noticed is that running ldd build.gnu.debug/tests produces the following output

$ ldd build.gnu.debug/tests 
	linux-vdso.so.1 (0x00007ffec9fa8000)
	libgfortran.so.5 => /usr/lib/x86_64-linux-gnu/libgfortran.so.5 (0x00007f638471e000)
	libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007f63845cf000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f63843dd000)
	libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007f6384393000)
	libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6384378000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f6384ae9000)

i.e. libpcre and libpcreposix are not marked as needed even though they are linked. Check out my question here if you want to know more about this. -Wl,--no-as-needed can be used to force linker to link libpcreposix and libpcre, but that does not fix the issue. The fact that without this option the libraries do not show up in the output of ldd may mean that the program still calls the default implementation from <regex.h> at runtime, which causes the issue because the constants in configure_ftlRegex.inc are generated for PCRE.

@robertrueger
Copy link
Member

I can not reproduce this. For me the tests binary is linked again PCRE as expected:

$ ldd build.gnu.debug/tests 
	linux-vdso.so.1 (0x00007ffeda2cf000)
	libpcreposix.so.0 => /usr/lib/libpcreposix.so.0 (0x00007fd3b8064000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007fd3b7ff2000)
	libgfortran.so.5 => /usr/lib/libgfortran.so.5 (0x00007fd3b7d2b000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007fd3b7be5000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fd3b7bcb000)
	libquadmath.so.0 => /usr/lib/libquadmath.so.0 (0x00007fd3b7b80000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007fd3b79b5000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fd3b7993000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fd3b81af000

@GaidaiIgor
Copy link
Author

GaidaiIgor commented Sep 18, 2020

Well, like I mentioned in the original post, it works with no issues on another machine for me as well. This might be machine-dependent. I use gcc 9.3.0 and ubuntu 20.04.

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

2 participants