premake / premake/premake-core
Error while building Premake 5 on CentOS 7
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.6k
- Forks
- 654
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 13
Description
Before opening a new issue, please use the issue search feature to see if a similar issue already exists. If not, please help us help you by filling in the template below.
What are you trying to do?
A short, concise description of the outcome you are trying to achieve, ex. "Add build settings to a specific file".
I want to try building premake5 from release source:
cd build/gmake2.unix
make config=release
Due to the pre-built binary requires a different version of shared libm.so.6 and libc.so.6 (the one i have are a different GLIBC versions, and i'm not sure how to get those missing specific version properly):
# /root/premake5
/root/premake5: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /root/premake5)
/root/premake5: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /root/premake5)
# ldd /root/premake5
/root/premake5: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /root/premake5)
/root/premake5: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /root/premake5)
linux-vdso.so.1 => (0x00007ffc0bbc5000)
libm.so.6 => /lib64/libm.so.6 (0x00007fde7fd18000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fde7fb14000)
libuuid.so.1 => /lib64/libuuid.so.1 (0x00007fde7f90f000)
libc.so.6 => /lib64/libc.so.6 (0x00007fde7f541000)
/lib64/ld-linux-x86-64.so.2 (0x00007fde80220000)
# strings /lib64/libm.so.6 | grep GLIBC_
GLIBC_2.2.5
GLIBC_2.4
GLIBC_2.15
GLIBC_PRIVATE
...
# strings /usr/lib64/libc.so.6 | grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE
...
What problem are you having?
A clear and concise description of the problem that is blocking you from your desired outcome, ex. "Premake is crashing with this error message: ..." or "I don't know how to do it."
Getting this error while doing make config=release
ssl_cache.c
ssl_ciphersuites.c
ssl_cli.c
ssl_cookie.c
ssl_msg.c
../../contrib/mbedtls/library/ssl_msg.c: In function ‘mbedtls_ssl_cf_memcpy_if_eq’:
../../contrib/mbedtls/library/ssl_msg.c:1169:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for( size_t i = 0; i < len; i++ )
^
../../contrib/mbedtls/library/ssl_msg.c:1169:5: note: use option -std=c99 or -std=gnu99 to compile your code
make[1]: *** [obj/Release/mbedtls-lib/ssl_msg.o] Error 1
make: *** [mbedtls-lib] Error 2
I've also tried make -f Bootstrap.mak linux but getting a different error:
# make -f Bootstrap.mak linux
rm -rf ./bin
rm -rf ./build
rm -rf ./obj
mkdir -p build/bootstrap
cc -o build/bootstrap/premake_bootstrap -DPREMAKE_NO_BUILTIN_SCRIPTS -DLUA_USE_POSIX -DLUA_USE_DLOPEN -I"contrib/lua/src" -I"contrib/luashim" src/host/*.c contrib/lua/src/lapi.c contrib/lua/src/lbaselib.c contrib/lua/src/lbitlib.c contrib/lua/src/lcode.c contrib/lua/src/lcorolib.c contrib/lua/src/lctype.c contrib/lua/src/ldblib.c contrib/lua/src/ldebug.c contrib/lua/src/ldo.c contrib/lua/src/ldump.c contrib/lua/src/lfunc.c contrib/lua/src/lgc.c contrib/lua/src/linit.c contrib/lua/src/liolib.c contrib/lua/src/llex.c contrib/lua/src/lmathlib.c contrib/lua/src/lmem.c contrib/lua/src/loadlib.c contrib/lua/src/lobject.c contrib/lua/src/lopcodes.c contrib/lua/src/loslib.c contrib/lua/src/lparser.c contrib/lua/src/lstate.c contrib/lua/src/lstring.c contrib/lua/src/lstrlib.c contrib/lua/src/ltable.c contrib/lua/src/ltablib.c contrib/lua/src/ltm.c contrib/lua/src/lundump.c contrib/lua/src/lutf8lib.c contrib/lua/src/lvm.c contrib/lua/src/lzio.c -lm -ldl -lrt -luuid
src/host/os_uuid.c:12:23: fatal error: uuid/uuid.h: No such file or directory
#include <uuid/uuid.h>
^
compilation terminated.
make: *** [linux] Error 1
What have you tried so far?
Describe any steps you've already taken to try to get past this issue.
Not sure what to do here, i wished there is an easier way to get premake on CentOS 7 (eg. through yum or something) or at least the pre-built binary doesn't relies on specific version of shared libs (specific major version are okay) or use static libs.
What version of Premake are you using?
premake5 --version will show you the version. If you are running a "-dev" version, please make sure you are up to date with the latest master branch.
Doesn't have any working premake.
Anything else we should know?
Add any other context about the problem here.
Btw, I'm using gcc & g++ 4.8.5 which came from yum install gcc g++, and libc from yum install glibc, not sure what else needed to be installed as there are no library/package prerequisites that need to be installed first on premake's build guide/wiki.
(You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to issues like these!)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the release build from build/gmake2.unix with make config=release, then compare it with Bootstrap.mak linux. Inspect the failing contrib/mbedtls/library/ssl_msg.c compilation and src/host/os_uuid.c include error. Done means documenting or implementing a supported CentOS 7 build path and confirming a working Premake binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, centos, linux
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100