Opened 4 years ago

Closed 4 years ago

#60976 closed defect (fixed)

R @4.0.2 fails to configure with Xcode 12, missing includes in bzip2 test program

Reported by: raramayo (Rodolfo Aramayo) Owned by: i0ntempest
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kjellpk (Kjell Konis), chrstphrchvz (Christopher Chavez)
Port: R

Description

Fails to configure R. Log file states:

:info:configure checking if zlib version >= 1.2.5... yes
:info:configure checking whether zlib support suffices... yes
:info:configure checking mmap support for zlib... yes
:info:configure checking for BZ2_bzlibVersion in -lbz2... yes
:info:configure checking bzlib.h usability... yes
:info:configure checking bzlib.h presence... yes
:info:configure checking for bzlib.h... yes
:info:configure checking if bzip2 version >= 1.0.6... no
:info:configure checking whether bzip2 support suffices... configure: error: bzip2 library and headers are required
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_R/R/work/R-4.0.2" && ./configure --prefix=/opt/local/Library/Frameworks --enable-R-framework --enable-memory-profiling --enable-R-shlib --enable-BLAS-shlib --without-tcltk --with-cairo --disable-java --with-included-gettext --without-blas --without-lapack --with-recommended-packages --with-x --x-include=/opt/local/include/X11 --x-lib=/opt/local/lib 
:info:configure Exit code: 1
:error:configure Failed to configure R, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_R/R/work/R-4.0.2/config.log
:error:configure Failed to configure R: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_R/R/main.log for details.

I have bzip2 installed

I tried issuing the port rev-upgrade command, which failed, and now when I call R, I get:

dyld: Library not loaded: /opt/local/lib/libicuuc.65.dylib
  Referenced from: /opt/local/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib
  Reason: image not found
Abort trap: 6

Change History (14)

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

Cc: kjellpk added
Owner: set to i0ntempest
Port: R added
Status: newassigned

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

Please attach the config.log mentioned in the error message.

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

Duplicate #61013 has a config.log but it shows a completely different error than the ticket description. I suspect it may have been generated by the user running configure manually.

comment:4 Changed 4 years ago by i0ntempest

I get this error only on 10.16.

comment:5 Changed 4 years ago by gjolleyrogers (Garry Jolley-Rogers)

+1 this error. macOS 10.15.6. many thanks

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

Summary: Failed to configure R, requires bzip2 version >= 1.0.6, yet bzip2 Version 1.0.8 is installedR @4.0.2 fails to configure with Xcode 12, missing includes in bzip2 test program

The correct config.log shows that this is the problem:

conftest.c:257:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
    exit(strcmp(ver, "1.0.6") < 0);
    ^
conftest.c:257:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
conftest.c:257:10: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration]
    exit(strcmp(ver, "1.0.6") < 0);
         ^
conftest.c:257:10: note: include the header <string.h> or explicitly provide a declaration for 'strcmp'

The reporter of the duplicate was using the Xcode 12 beta CLTs. I would assume that's why everyone isn't seeing this.

comment:7 Changed 4 years ago by i0ntempest

A few weeks ago apple erroneously pushed a beta CLT update to all users, so if you are on 10.15.6 and Xcode 11, maybe your OS automatically updated CLT for you. Try deleting /Library/Developer/CommandLineTools/ and reinstalling the release version of CLT using xcode-select, then try if the problem goes away. If the beta update shows up again, use softwareupdate --ignore "Command Line Tools beta 5 for Xcode" (or whatever beta version showed up to you) to ignore it.

Last edited 4 years ago by i0ntempest (previous) (diff)

comment:8 Changed 4 years ago by jfb007

That worked for me! Thanks a lot for Your help and best Regards

Josef

comment:9 Changed 4 years ago by i0ntempest

Resolution: fixed
Status: assignedclosed

Just tried with the release version of Xcode 12 and CLT that went out today, it built fine. So I'm going to close this, if someone still has the problem please reopen or open a new one.

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

Implicit declaration warnings still need to be fixed; they will become an error again in the not-too-distant future.

comment:11 Changed 4 years ago by i0ntempest

Resolution: fixed
Status: closedreopened

Indeed the CLT update today broke it again.

comment:12 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

comment:13 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:14 Changed 4 years ago by chrstphrchvz (Christopher Chavez)

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.