Opened 4 years ago

Closed 3 years 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 Carsten Schmidt)
Port: elftoolchain

Description

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) 4 years ago.
main.log for elftoolchain

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by cooljeanius (Eric Gallager)

Attachment: elftoolchainmain.log added

main.log for elftoolchain

comment:1 Changed 4 years ago by mf2k (Frank Schima)

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

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

Cc: ryandesign added
Keywords: haspatch added

comment:3 Changed 3 years ago by ryandesign (Ryan Carsten 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 destroot.target since it's already set by base. Remove unneeded
addition of CFLAGS and LDFLAGS in elftoolchain.prog.mk 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 elftoolchain.tex.mk 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.