Opened 9 months ago

Closed 12 days ago

Last modified 12 days ago

#59150 closed defect (fixed)

libiconv-bootstrap: fails to build with clang on 10.6

Reported by: mojca (Mojca Miklavec) Owned by: ryandesign (Ryan Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: libiconv-bootstrap

Description

I don't quite understand how it got built on the buildbot and not here, but:

libtool: compile:  /usr/bin/clang -I. -I. -I../include -I./../include -I.. -I./.. -pipe -Os -arch x86_64 -fvisibility=hidden -DLIBDIR=\"/opt/local/libexec/libcxx-bootstrap/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/opt/local/libexec/libcxx-bootstrap/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -Drelocate2=libiconv_relocate2 -DHAVE_CONFIG_H -c ./relocatable.c -o relocatable.o >/dev/null 2>&1
In file included from ./iconv.c:112:
./encodings.def:71:1: warning: incompatible pointer types initializing 'int (conv_t, ucs4_t *, unsigned char const *, int)', expected
      'int (*)(conv_t, ucs4_t *, unsigned char const *, size_t)'
DEFENCODING(( "UTF-8-MAC",              /* utf8-nfd */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./encodings.def:75:15: note: instantiated from:
            { utf8mac_mbtowc, NULL },     { utf8mac_wctomb, NULL })
              ^~~~~~~~~~~~~~
./encodings.def:71:1: warning: incompatible pointer types initializing 'int (conv_t, unsigned char *, ucs4_t, int)', expected 'int (*)(conv_t, unsigned char *, ucs4_t, size_t)'
DEFENCODING(( "UTF-8-MAC",              /* utf8-nfd */
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./encodings.def:75:45: note: instantiated from:
            { utf8mac_mbtowc, NULL },     { utf8mac_wctomb, NULL })
                                            ^~~~~~~~~~~~~~
./iconv.c:188:1: error: cannot combine with previous 'static' declaration specifier
static const struct alias *
^
3 diagnostics generated.
make[1]: *** [iconv.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libiconv/libiconv-bootstrap/work/libiconv-1.16/lib'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libiconv/libiconv-bootstrap/work/libiconv-1.16'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libiconv/libiconv-bootstrap/work/libiconv-1.16" && /usr/bin/make CC=/usr/bin/clang -f Makefile.devel && /usr/bin/make -j2 -w all 
Exit code: 2
Error: Failed to build libiconv-bootstrap: command execution failed
DEBUG: Error code: CHILDSTATUS 47316 2
DEBUG: Backtrace: command execution failed
    while executing
"system {*}$notty {*}$nice $fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libiconv/libiconv-bootstrap/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port libiconv-bootstrap failed

Building it with configure.compiler=llvm-gcc-4.2 apparently helped, while another user reports a fix by changing static const struct alias * to const struct alias *

Attachments (1)

main.log (54.4 KB) - added by mojca (Mojca Miklavec) 9 months ago.

Download all attachments as: .zip

Change History (8)

Changed 9 months ago by mojca (Mojca Miklavec)

Attachment: main.log added

comment:1 Changed 9 months ago by mojca (Mojca Miklavec)

Summary: libiconv-boostrap: fails to build with clang on 10.6libiconv-bootstrap: fails to build with clang on 10.6

comment:2 Changed 9 months ago by mojca (Mojca Miklavec)

I'm sorry, this looks like an old xcode, I'll try to figure out why I ended up installing that one.

comment:3 Changed 12 days ago by kencu (Ken)

Resolution: invalid
Status: assignedclosed

confirmed. you see this error with Xcode 3.2 on 10.6.8, but not with the required Xcode 3.2.6.

comment:4 Changed 12 days ago by ryandesign (Ryan Schmidt)

Resolution: invalid
Status: closedreopened

comment:5 Changed 12 days ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: reopenedclosed

In 91737e36c772a9311614952c81a75ffc453de518/macports-ports (master):

libiconv: Require Xcode >= 3.2.6 on 10.6

Closes: #59150

comment:6 Changed 12 days ago by kencu (Ken)

I thought we made our basic assumption that users had the right Xcode installed for every os.version as a baseline.

I therefore wasn't planning on putting tests like this to see if they have not got the recommended Xcode installed in any Portfiles myself, but of course, this one is yours.

comment:7 Changed 12 days ago by ryandesign (Ryan Schmidt)

It's easier to add a line of code to enforce the requirement than to field unlimited future bug reports about the problem.

Note: See TracTickets for help on using tickets.