Opened 4 years ago

Closed 3 years ago

#61944 closed defect (duplicate)

torsocks @2.3.0: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99

Reported by: ASGR71 Owned by: sami.laine@…
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: catalina bigsur monterey Cc:
Port: torsocks

Description (last modified by jmroot (Joshua Root))

Hi MacPorts,

torsocks produced this output on the command line:

--->  Computing dependencies for torsocks
--->  Fetching archive for torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://lil.fr.packages.macports.org/torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://cph.dk.packages.macports.org/torsocks
--->  Building torsocks
Error: Failed to build torsocks: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port torsocks failed

Unfortunately, the log file does not exists!

I did read some notes about problems with BigSur but I'm sure I did everything in the right order and have all the necessary dev software. I tried installing it twice and on both occassions this error was generated but some dependencies were installed first.

OS: BigSur 11.1 Xcode: 12.3 System: MacBookPro 11,3

Attachments (1)

main.log (41.0 KB) - added by ASGR71 4 years ago.
log output from torsocks build process

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by reneeotten (Renee Otten)

Keywords: torsocks build error removed

Please do sudo port clean --all torsocks ; sudo port install torsocks and attach the logfile

comment:2 Changed 4 years ago by jmroot (Joshua Root)

Description: modified (diff)
Owner: set to sami.laine@…
Status: newassigned

comment:3 Changed 4 years ago by ASGR71

Thanks Renee,

Ran commands as requested but still getting error message. Still not getting any log files anywhere, not in /opt /Users or /Library

--->  Computing dependencies for torsocks
--->  Fetching archive for torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://lil.fr.packages.macports.org/torsocks
--->  Attempting to fetch torsocks-2.3.0_0.darwin_20.x86_64.tbz2 from https://cph.dk.packages.macports.org/torsocks
--->  Fetching distfiles for torsocks
--->  Attempting to fetch torsocks-2.3.0.tar.xz from https://mse.uk.distfiles.macports.org/torsocks
--->  Verifying checksums for torsocks
--->  Extracting torsocks
--->  Applying patches to torsocks
--->  Configuring torsocks
--->  Building torsocks
Error: Failed to build torsocks: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port torsocks failed
Last edited 4 years ago by ASGR71 (previous) (diff)

Changed 4 years ago by ASGR71

Attachment: main.log added

log output from torsocks build process

comment:4 Changed 4 years ago by ASGR71

Oooops!

Found the log file, attached. For some odd reason the directory '/opt/local/var/macports' was hidden in Finder.

comment:5 Changed 4 years ago by ASGR71

Hi MacPorts,

Any more progress regarding this declaration / compile error...

:info:build   CC       test_getpeername.o
:info:build test_dns.c:95:11: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build         result = gethostbyaddr_r((const void *)&addr,
:info:build                  ^
:info:build test_dns.c:95:11: note: did you mean 'gethostbyaddr'?
:info:build /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/netdb.h:274:17: note: 'gethostbyaddr' declared here
:info:build struct hostent  *gethostbyaddr(const void *, socklen_t, int);
:info:build                  ^
:info:build test_dns.c:114:11: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
:info:build         result = gethostbyaddr_r((const void *)&addr,
:info:build                  ^
:info:build 2 errors generated.
:info:build make[2]: *** [test_dns.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/work/torsocks-2.3.0/tests'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/work/torsocks-2.3.0/tests'
:info:build make: *** [all-recursive] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/work/torsocks-2.3.0'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/work/torsocks-2.3.0" && /usr/bin/make -j8 -w all 
:info:build Exit code: 2
:error:build Failed to build torsocks: command execution failed
:debug:build Error code: CHILDSTATUS 9744 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_net_torsocks/torsocks/main.log for details.

Thank you.

comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: catalina bigsur monterey added
Resolution: duplicate
Status: assignedclosed
Summary: [OS11.1] 'Failed to build torsocks: command execution failed' error messagetorsocks @2.3.0: error: implicit declaration of function 'gethostbyaddr_r' is invalid in C99

Duplicate of #61631.

Note: See TracTickets for help on using tickets.