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

[Yara 4.5.0][Build error] --- pread64 not found on Alpine Linux #2050

Closed
nivscadafence opened this issue Mar 4, 2024 · 5 comments
Closed

Comments

@nivscadafence
Copy link

Yara build on Alpine Linux fails:

libyara/proc/linux.c: In function 'yr_process_fetch_memory_block_data': libyara/proc/linux.c:252:9: warning: implicit declaration of function 'pread64'; did you mean 'pread'? [-Wimplicit-function-declaration] 252 | if (pread64( | ^~~~~~~ | pread CCLD libyara.la copying selected object files to avoid basename conflicts... CCLD yara /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: ./.libs/libyara.so: undefined reference to pread64'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1735: yara] Error 1
make[1]: Leaving directory '/tmp/sources/yara-4.5.0'
make: *** [Makefile:1190: all] Error 2
The command '/bin/sh -c cd /tmp/sources && tar -zxf yara-${YARA_VERSION}.tar.gz && cd yara-${YARA_VERSION} && ./bootstrap.sh && ./configure --with-crypto --enable-magic && make && make install && make check' returned a non-zero code: 2`

@nivscadafence nivscadafence changed the title pread64 not found on Alpine Linux [Yara 4.5.0][Build error] --- pread64 not found on Alpine Linux Mar 4, 2024
@vthib
Copy link
Contributor

vthib commented Mar 4, 2024

On which version of Alpine do you have this issue?

This is very likely due to musl 1.2.4, a fix is in progress here: #2048

@nivscadafence
Copy link
Author

docker image:

python:3.9-alpine

plusvic added a commit that referenced this issue Apr 7, 2024
See also PR #2048.
@plusvic
Copy link
Member

plusvic commented Apr 7, 2024

Should be fixed in 833a580

@plusvic plusvic closed this as completed Apr 7, 2024
@fwosar
Copy link

fwosar commented May 24, 2024

Given that the build is broken on some non-MUSL systems right now as well, like ArchLinux for example, any chance for a point release that includes the fix that could be propagated to the various dependency managers, @plusvic?

@plusvic
Copy link
Member

plusvic commented May 25, 2024

Yes, I think it's time for a new release.

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

4 participants