rpcsvc-proto: compile failure
Open
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @Andy2244 @neheb @ffontaine
Environment:
x86_64
latest git
Description:
Would seem like a issue with musl maybe?
Adding #define stat64 stat makes it build without problem.
build log:
Format code blocks by wrapping them with pairs of ```
/usr/src/openwrt/staging_dir/host/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/src/openwrt/staging_dir/host/include -I/usr/src/openwrt/staging_dir/hostpkg/include -I/usr/src/openwrt/staging_dir/target-x86_64_musl/host/include -O2 -I/usr/src/openwrt/staging_dir/host/include -I/usr/src/openwrt/staging_dir/hostpkg/include -I/usr/src/openwrt/staging_dir/target-x86_64_musl/host/include -c -o rpc_main.o rpc_main.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
rpc_main.c: In function 'find_cpp':
rpc_main.c:340:17: error: storage size of 'buf' isn't known
340 | struct stat64 buf;
| ^~~
rpc_main.c:342:7: warning: implicit declaration of function 'stat64'; did you mean 'stat'? [-Wimplicit-function-declaration]
342 | if (stat64 (CPP, &buf) == 0)
| ^~~~~~
| stat
rpc_main.c: In function 'checkfiles':
rpc_main.c:1128:17: error: storage size of 'buf' isn't known
1128 | struct stat64 buf;
| ^~~
make[6]: *** [Makefile:438: rpc_main.o] Error 1
make[6]: Leaving directory '/usr/src/openwrt/build_dir/hostpkg/rpcsvc-proto-1.4.3/rpcgen'
make[5]: *** [Makefile:389: all-recursive] Error 1
make[5]: Leaving directory '/usr/src/openwrt/build_dir/hostpkg/rpcsvc-proto-1.4.3'
make[4]: *** [Makefile:330: all] Error 2
make[4]: Leaving directory '/usr/src/openwrt/build_dir/hostpkg/rpcsvc-proto-1.4.3'
make[3]: *** [Makefile:51: /usr/src/openwrt/build_dir/hostpkg/rpcsvc-proto-1.4.3/.built] Error 2
make[3]: Leaving directory '/usr/src/openwrt/feeds/packages/libs/rpcsvc-proto'
time: package/feeds/packages/rpcsvc-proto/host-compile#4.67#0.60#6.25
ERROR: package/feeds/packages/rpcsvc-proto [host] failed to build.
make[2]: *** [package/Makefile:126: package/feeds/packages/rpcsvc-proto/host/compile] Error 1
make[2]: Leaving directory '/usr/src/openwrt'
make[1]: *** [package/Makefile:122: /usr/src/openwrt/staging_dir/target-x86_64_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/usr/src/openwrt'
make: *** [/usr/src/openwrt/include/toplevel.mk:232: world] Error 2
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 with rpc_main.c, especially find_cpp and checkfiles, where struct stat64 and stat64 are used. Reproduce the host compile for rpcsvc-proto-1.4.3 under the x86_64 musl environment and inspect the package build path and Makefile. Done means the host package builds without the reported stat64 errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100