#63457 closed defect (fixed)
sitecopy error: implicit declaration of function 'socket' is invalid in C99
Reported by: | scrutarius | Owned by: | julian@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | glennra (Glenn Ramsey) | |
Port: | sitecopy |
Description
Sitecopy is not compiling on the latest Big Sur (11.5.2) on my M1-based iMac. I am guessing it is a neon compatibility, but that is a guess on my part. The log shows the following:
:info:configure checking for strcasecmp... yes :info:configure checking for signal... yes :info:configure checking for setvbuf... yes :info:configure checking for setsockopt... yes :info:configure checking for stpcpy... yes :info:configure checking for poll... (cached) no :info:configure checking for fcntl... yes :info:configure checking for getsockopt... yes :info:configure checking whether stpcpy is declared... yes :info:configure checking for library containing socket... not found :info:configure configure: error: could not find library containing socket
The later line being the probable cause.
I would add that it does not compile on my intel-based iMac running Catalina 10.15.7 either. I've copied over the binary from another intel-based iMac running Catalina 10.15.7 to this intel-based machine (not the M1!) where it was been working as a temporary fix.
Change History (13)
comment:1 Changed 3 years ago by kencu (Ken)
comment:2 Changed 3 years ago by kencu (Ken)
Owner: | set to julian@… |
---|---|
Port: | sitecopy added |
Status: | new → assigned |
comment:3 Changed 3 years ago by scrutarius
| int | main () | { | socket(); | ; | return 0; | } configure:11511: gcc -o conftest -g -O2 -no-cpp-precomp -flat_namespace conftest.c -linet >&5 conftest.c:73:1: error: implicit declaration of function 'socket' is invalid in C99 [-Werror,-Wimplicit-function-declaration] socket(); ^ 1 error generated.
As I said, socket is missing. No idea why.
comment:4 Changed 3 years ago by kencu (Ken)
Ah, that turns out to be an easier one.
The newer systems fail on implicit function definitions.
The trick is to find the header that defines the function, and properly add it to the test.
We have fixed this in other ports about 1.2 million times so far :>
comment:5 Changed 3 years ago by kencu (Ken)
Summary: | SItecopy not compiling under Big Sur on M1-based iMac → sItecopy error: implicit declaration of function 'socket' is invalid in C99 |
---|
comment:6 Changed 3 years ago by kencu (Ken)
Given this port is apparently running configure with "gcc" it looks like it hasn't had any proper attention in some time...
comment:7 Changed 3 years ago by kencu (Ken)
Summary: | sItecopy error: implicit declaration of function 'socket' is invalid in C99 → sitecopy error: implicit declaration of function 'socket' is invalid in C99 |
---|
comment:8 Changed 3 years ago by kencu (Ken)
Yike. Last update was 2008
http://www.manyfish.co.uk/sitecopy/
not sure if this one is still worth having in MacPorts any longer -- but I will take a peek if it's easy.
Are you sure there is not something more recent that would work for you?
comment:9 Changed 3 years ago by kencu (Ken)
here you go
https://github.com/macports/macports-ports/pull/12121
% port -v installed sitecopy The following ports are currently installed: sitecopy @0.16.6_1 (active) requested_variants='' platform='darwin 20' archs='x86_64' date='2021-09-06T15:49:28-0700'
comment:11 Changed 3 years ago by Ken <21211439+kencu@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:12 follow-up: 13 Changed 2 years ago by glennra (Glenn Ramsey)
This is broken again, now that neon is at version 32.
comment:13 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | glennra added |
---|
for this kind of build there should be a file called "config.log" that has the actual attempted build commands and output from the tools in it. If you look in there at the part where the socket library testing is happening, you may find the clue you need to solve your issue.
If I tried to fix it, that is exactly where I would start.