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

Build issue on RHEL 8.6 #135

Open
sudha-zetta opened this issue Mar 19, 2024 · 1 comment
Open

Build issue on RHEL 8.6 #135

sudha-zetta opened this issue Mar 19, 2024 · 1 comment

Comments

@sudha-zetta
Copy link

Hi,

I am trying to build this library on RHEL 8.6, using the master branch as of today.

./build-aux/autogen.sh
./configure

I ran make and make install, they ran without errors. But when I link against libsafec, I see these 2 errors which I am investigating.

libest/libest-source/src/est/.libs/libest.so: undefined reference to memzero_s' libest/libest-source/src/est/.libs/libest.so: undefined reference to memcpy_s'
collect2: error: ld returned 1 exit status

When I check the config.log, I see this error

configure:19287: result: no
configure:19287: checking for memzero_s
configure:19287: gcc -o conftest -O2 -D_FORTIFY_SOURCE=2 conftest.c >&5
/tmp/ccI0LrQJ.o: In function main': conftest.c:(.text.startup+0x7): undefined reference to memzero_s'
collect2: error: ld returned 1 exit status
configure:19287: $? = 1
configure: failed program was:

configure:19247: result: no
configure:19266: checking for _memcpy_s_chk
configure:19266: gcc -o conftest -O2 -D_FORTIFY_SOURCE=2 conftest.c >&5
/tmp/ccQ5cu5d.o: In function main': conftest.c:(.text.startup+0x7): undefined reference to _memcpy_s_chk'
collect2: error: ld returned 1 exit status
configure:19266: $? = 1
configure: failed program was:

I see a bunch of the functions that are undefined as well.

conftest.c:(.text.startup+0x7): undefined reference to _snprintf_s_chk' conftest.c:(.text.startup+0x7): undefined reference to _vfprintf_s_chk'
conftest.c:(.text.startup+0x7): undefined reference to _vsprintf_s_chk' conftest.c:(.text.startup+0x7): undefined reference to _vsnprintf_s_chk'
conftest.c:(.text.startup+0x7): undefined reference to memset_s' conftest.c:(.text.startup+0x7): undefined reference to memcpy_s'
conftest.c:(.text.startup+0x7): undefined reference to memmove_s' conftest.c:(.text.startup+0x7): undefined reference to memzero_s'
conftest.c:(.text.startup+0x7): undefined reference to memchr_s' conftest.c:(.text.startup+0x7): undefined reference to memrchr_s'
conftest.c:(.text.startup+0x7): undefined reference to memccpy_s' conftest.c:(.text.startup+0x7): undefined reference to sprintf_s'
conftest.c:(.text.startup+0x7): undefined reference to strcat_s' conftest.c:(.text.startup+0x7): undefined reference to strcpy_s'
conftest.c:(.text.startup+0x7): undefined reference to strncat_s' conftest.c:(.text.startup+0x7): undefined reference to strncpy_s'
conftest.c:(.text.startup+0x7): undefined reference to strnlen_s' conftest.c:(.text.startup+0x7): undefined reference to strtok_s'
conftest.c:(.text.startup+0x7): undefined reference to strerror_s' conftest.c:(.text.startup+0x7): undefined reference to vsprintf_s'
conftest.c:(.text.startup+0x7): undefined reference to tmpnam_s' conftest.c:(.text.startup+0x7): undefined reference to snprintf_s'
conftest.c:(.text.startup+0x7): undefined reference to `vsnprintf_s'
etc

Did configure work as expected? or Do I have to pass any arguments to it?

Thanks,
Sudha

@sudha-zetta
Copy link
Author

Here is nm results

[root@rhat862dev lib]# nm /usr/local/lib/libsafec.so | grep memzero_s
00000000000184c0 T _memzero_s_chk
[root@rhat862dev lib]# nm /usr/local/lib/libsafec.so | grep memcpy_s
0000000000008000 T _memcpy_s_chk
0000000000010920 T _wmemcpy_s_chk
[root@rhat862dev lib]#

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

1 participant