Opened 9 months ago

Closed 5 months ago

#62419 closed defect (fixed)

elftoolchain @0.7.1: error: implicit declaration of function 'htole32' is invalid in C99

Reported by: cooljeanius (Eric Gallager) Owned by: raimue (Rainer Müller)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur catalina haspatch Cc: ryandesign (Ryan Schmidt)
Port: elftoolchain


Another victim of -Werror=implicit-function-declaration being on by default now:

--- libpe_dos.po ---
libpe_dos.c:122:6: error: implicit declaration of function 'htole32' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            htole32(pe_magic) != PE_SIGNATURE) {
1 error generated.
*** [libpe_dos.po] Error code 1

bmake[1]: stopped in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_elftoolchain/elftoolchain/work/elftoolchain-0.7.1/libpe

Attachments (1)

elftoolchainmain.log (397.8 KB) - added by cooljeanius (Eric Gallager) 9 months ago.
main.log for elftoolchain

Download all attachments as: .zip

Change History (4)

Changed 9 months ago by cooljeanius (Eric Gallager)

Attachment: elftoolchainmain.log added

main.log for elftoolchain

comment:1 Changed 9 months ago by mf2k (Frank Schima)

Cc: raimue removed
Owner: set to raimue
Status: newassigned

comment:2 Changed 5 months ago by ryandesign (Ryan Schmidt)

Cc: ryandesign added
Keywords: haspatch added

comment:3 Changed 5 months ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: assignedclosed

In 195adb123b397d5ae850d91105f668aff83e8161/macports-ports (master):

elftoolchain: Fix implicit func decls; other fixes

Fix implicit declaration of function htole32 which caused build failure
on Xcode 12 and later.

Closes: #62419

Remove unneeded additions of defines of htobe32 in archive.c and write.c
because it's already defined in _elftc.h. Use makefile portgroup to
simplify using the right compiler and flags. Copy build.args to
destroot.args programmatically to avoid code duplication. Don't need to
set since it's already set by base. Remove unneeded
addition of CFLAGS and LDFLAGS in since the
makefile portgroup already sets them. Patch make-toolchain-version to no
longer use svnversion or git describe since we're not using a working
copy or clone and since those utilities might not be installed. Create
relative symlinks rather than absolute. Fix erroneously formatted
warning in by changing echo -n to printf. Specify
full sourceforge path to avoid redirects and fetch failures. Add size to
checksums. Add modeline.

Note: See TracTickets for help on using tickets.