Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#61477 closed defect (fixed)

clang-9.0 fails to build on Big Sur macOS 11.0.1 Xcode 12.2

Reported by: jhoyt4 Owned by: kencu (Ken)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jeremyhu (Jeremy Huddleston Sequoia), jhoyt4, smeingast (Stefan Meingast), karoliskoncevicius (Karolis Koncevičius), Tommaso93, tiperiu, cjones051073 (Chris Jones)
Port: clang-9.0 clang-10

Description

clang-9.0 is failing to build on Big Sur macOS 11.0.1 Xcode 12.2

Log file attached

Attachments (5)

main.log (3.9 MB) - added by jhoyt4 3 years ago.
failed build logfile
main.clang10.log (2.7 MB) - added by jhoyt4 3 years ago.
clang10 output
main.2.log (3.5 MB) - added by wisehaus 3 years ago.
Build log for clang-devel
main_clang-devel.log (2.9 MB) - added by Tommaso93 3 years ago.
main.3.log (4.1 MB) - added by jhoyt4 3 years ago.
latest failed build log for clang-9.0

Change History (49)

Changed 3 years ago by jhoyt4

Attachment: main.log added

failed build logfile

comment:1 Changed 3 years ago by kencu (Ken)

Cc: jeremyhu added
Keywords: clang-9.0 removed
Owner: set to kencu
Status: newassigned

do you need clang 9.0 on BigSur?

try clang-10 perhaps.

clang-11 should be along soon to.

comment:2 Changed 3 years ago by jhoyt4

it's a dependency for qt5

comment:3 Changed 3 years ago by kencu (Ken)

:info:build [ 27%] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regexec.c.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/build/lib/Support && /usr/bin/clang -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/build/lib/Support -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/lib/Support -I/opt/local/include/libxml2 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/build/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/include -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wstring-conversion -DNDEBUG -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -mmacosx-version-min=11.0 -o CMakeFiles/LLVMSupport.dir/regexec.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/lib/Support/regexec.c
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:31: error: invalid application of 'sizeof' to an incomplete type 'struct stat64'
:info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
:info:build                               ^     ~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:45: note: forward declaration of '__sanitizer::stat64'
:info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
:info:build                                             ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:33: error: invalid application of 'sizeof' to an incomplete type 'struct statfs64'
:info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
:info:build                                 ^     ~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:47: note: forward declaration of '__sanitizer::statfs64'
:info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
:info:build                                               ^
:info:build 2 errors generated.
:info:build make[2]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonNoHooks.osx.dir/sanitizer_platform_limits_posix.cc.o] Error 1

comment:4 Changed 3 years ago by jhoyt4

same issue with trying to build clang-10 (see log)

Changed 3 years ago by jhoyt4

Attachment: main.clang10.log added

clang10 output

comment:5 in reply to:  2 Changed 3 years ago by kencu (Ken)

Replying to jhoyt4:

it's a dependency for qt5

not on my catalina system it isn't.

Can we figure out what is pulling in an open-source clang compiler on your Big Sur system?

Here is what I see on Catalina:

% port rdeps qt5-qtbase
The following ports are dependencies of qt5-qtbase @5.14.2_1+openssl:
  xz
    libiconv
      gperf
    gettext
      ncurses
  pkgconfig
  gawk
  zlib
  libpng
  jpeg
  freetype
    brotli
      cmake
        libcxx
        curl
          libidn2
            autoconf
            automake
            libtool
              xattr
                unzip
            libunistring
              perl5
                perl5.28
                  db48
                  gdbm
                    readline
              texinfo
                help2man
                  p5.28-locale-gettext
                perl5.30
          libpsl
            python38
              bzip2
              expat
              libedit
              libffi
                expect
                  tcl
                dejagnu
              openssl
              sqlite3
              python_select
              python3_select
            glib2
              libxml2
                icu
              pcre
          curl-ca-bundle
        libarchive
          lzo2
          lz4
          zstd
        libuv
  dbus
  pcre2
  harfbuzz
    cairo
      libpixman
      fontconfig
        ossp-uuid
      xrender
        xorg-libX11
          xorg-xtrans
          xorg-xorgproto
          xorg-util-macros
          xorg-libXdmcp
          xorg-libXau
          xorg-libxcb
            xorg-xcb-proto
            xorg-libpthread-stubs
      xorg-libXext
      xorg-xcb-util
    graphite2
      fonttools
        py38-setuptools
        py38-lxml
          libxslt
        py38-brotli
        py38-zopfli
        py38-unicodedata2
  double-conversion

but perhaps it's some other component you're pulling on

comment:6 Changed 3 years ago by jhoyt4

sorry it's a dependency for "qt5-qttools" (which gets installed when you install qt5)

% port rdeps qt5-qttools
The following ports are dependencies of qt5-qttools @5.14.2_0:
  xz
    libiconv
      gperf
    gettext
      ncurses
  pkgconfig
  clang-9.0
    cmake
      libcxx
      curl
        libidn2
          autoconf
          automake
          libtool
            xattr
              unzip
          libunistring
            perl5
              perl5.28
                db48
                gdbm
                  readline
            texinfo
              help2man
                p5.28-locale-gettext
              perl5.30
        libpsl
          python38
            bzip2
            expat
            libedit
            libffi
              expect
                tcl
              dejagnu
            openssl
              zlib
            sqlite3
            python_select
            python3_select
          glib2
            libxml2
              icu
            pcre
        curl-ca-bundle
      libarchive
        lzo2
        lz4
        zstd
      libuv
    libomp
    llvm-9.0
      xar
      llvm_select
    clang_select
    ld64
      ld64-xcode
  qt5-qtdeclarative
    python27
      python2_select
    qt5-qtsvg
      qt5-qtbase
        gawk
        libpng
        jpeg
        freetype
          brotli
        dbus
        pcre2
        harfbuzz
          cairo
            libpixman
            fontconfig
              ossp-uuid
            xrender
              xorg-libX11
                xorg-xtrans
                xorg-xorgproto
                xorg-util-macros
                xorg-libXdmcp
                xorg-libXau
                xorg-libxcb
                  xorg-xcb-proto
                  xorg-libpthread-stubs
            xorg-libXext
            xorg-xcb-util
          graphite2
            fonttools
              py38-setuptools
              py38-lxml
                libxslt
              py38-brotli
              py38-zopfli
              py38-unicodedata2
        double-conversion

Last edited 3 years ago by jhoyt4 (previous) (diff)

comment:7 Changed 3 years ago by kencu (Ken)

hmm. Looks like this did it:

                # qdoc now uses libclang for parsing C/C++ code
                # see https://wiki.qt.io/New_Features_in_Qt_5.11
                configure.env-append LLVM_INSTALL_DIR=${prefix}/libexec/llvm-9.0

and so the dep on clang-9.0 was added.

Well -- I wonder if that is still needed. That is a fairly old addition.

The mainstream qt5 installer does not require all users to install clang/llvm-9.0 outside MacPorts. So that is open for review I guess, but not today.

comment:8 Changed 3 years ago by jhoyt4

Cc: jhoyt4 added

comment:9 Changed 3 years ago by karoliskoncevicius (Karolis Koncevičius)

I am having a similar problem with clang-9.0 for the "R" port:

Warning: reinplace s|/usr/bin/env python|/usr/bin/python2.7|g didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/tools/clang/tools/scan-build/bin/set-xcode-analyzer
--->  Configuring clang-9.0
--->  Building clang-9.0
Error: Failed to build clang-9.0: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port clang-9.0 failed

And the error lines from the log:

 :info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
 :info:build                               ^     ~~~~~~~~~~~~~~~
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:45: note: forward declaration of  '__sanitizer::stat64'
 :info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
 :info:build                                             ^
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:33: error: invalid application o f 'sizeof' to an incomplete type 'struct statfs64'
 :info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
 :info:build                                 ^     ~~~~~~~~~~~~~~~~~
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:195:47: note: forward declaration of  '__sanitizer::statfs64'
 :info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
 :info:build                                               ^
 :info:build 2 errors generated.
 :info:build make[2]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/sanitizer_platform_limits_posix.cc.o] Error 1
 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/build'
 :info:build make[1]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/all] Error 2
 :info:build make[1]: *** Waiting for unfinished jobs....
 :info:build [ 28%] Building CXX object lib/DebugInfo/PDB/CMakeFiles/LLVMDebugInfoPDB.dir/Native/PDBStringTable.cpp.o
Last edited 3 years ago by karoliskoncevicius (Karolis Koncevičius) (previous) (diff)

comment:10 Changed 3 years ago by smeingast (Stefan Meingast)

Cc: smeingast added

Same, there are actually quite a number of builds that require clang-9.0 as of now, in my case e.g. scikit-learn and scikit-image

Last edited 3 years ago by smeingast (Stefan Meingast) (previous) (diff)

comment:11 Changed 3 years ago by karoliskoncevicius (Karolis Koncevičius)

Cc: karoliskoncevicius added

comment:12 Changed 3 years ago by Tommaso93

I also have the clang-9.0 issue that is required by R and also root6.

comment:13 Changed 3 years ago by Tommaso93

Cc: Tommaso93 added

comment:14 Changed 3 years ago by kencu (Ken)

had duplicate #61497

comment:15 Changed 3 years ago by kencu (Ken)

If clang-10 is building on BigSur, we can update the dependency in all these ports like qttools to that clang version. -- EDIT -- I see someone tried clang-10 and it had the same error.

clang-11 is coming, I just updated and pushed clang-devel, dated as of yesterday.

The struct64 thing looks like the headers changed a bit.

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:16 Changed 3 years ago by kencu (Ken)

/usr/include/sys/stat.h is virtually identical between the 10.15 SDK and the 11.0 SDK, so the answer is not obvious there...

Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:17 Changed 3 years ago by Tommaso93

Using the new clang-11, will be possible to run ports that have the dependency on clang-9? Because there are some very important ports that uses clang-9

comment:18 in reply to:  17 ; Changed 3 years ago by kencu (Ken)

Replying to Tommaso93:

Using the new clang-11, will be possible to run ports that have the dependency on clang-9?

That would be the idea...

clang-9.0 seems to have been used in many places, so if we can patch it to build on BigSur, all the better for right now.

Otherwise we'll have to change all the clang-9.0 references in various other ports to some newer clang, on the systems that can build the newer clang, etc. A larger project, and then we'd have to sort out the wreckage, if any.

Try building the clang-devel that I updated yesterday, and please report back if that builds on BigSur.

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

Cc: tiperiu added

Changed 3 years ago by wisehaus

Attachment: main.2.log added

Build log for clang-devel

comment:20 Changed 3 years ago by karoliskoncevicius (Karolis Koncevičius)

For me clang-devel is also failing:

--->  Attempting to fetch clang-devel-20200531-77e1181d_0+analyzer+assertions+libstdcxx.darwin_20.x86_64.tbz2 from https://nue.de.packages.macports.org/clang-devel
--->  Attempting to fetch clang-devel-20200531-77e1181d_0+analyzer+assertions+libstdcxx.darwin_20.x86_64.tbz2 from https://lil.fr.packages.macports.org/clang-devel
--->  Attempting to fetch clang-devel-20200531-77e1181d_0+analyzer+assertions+libstdcxx.darwin_20.x86_64.tbz2 from https://mse.uk.packages.macports.org/clang-devel
--->  Fetching distfiles for clang-devel
--->  Verifying checksums for clang-devel
--->  Extracting clang-devel
--->  Applying patches to clang-devel
Warning: reinplace s|/usr/bin/env python|/opt/local/bin/python3.8|g didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/llvm-project/llvm/tools/clang/tools/scan-build/bin/set-xcode-analyzer
--->  Configuring clang-devel
--->  Building clang-devel
Error: Failed to build clang-devel: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port clang-devel failed

The log:

 :info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
 :info:build                               ^     ~~~~~~~~~~~~~~~
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/llvm-project/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:174:45: note: forward declar ation of '__sanitizer::stat64'
 :info:build   unsigned struct_stat64_sz = sizeof(struct stat64);
 :info:build                                             ^
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/llvm-project/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:201:33: error: invalid appli cation of 'sizeof' to an incomplete type 'struct statfs64'
 :info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
 :info:build                                 ^     ~~~~~~~~~~~~~~~~~
 :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/llvm-project/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp:201:47: note: forward declar ation of '__sanitizer::statfs64'
 :info:build   unsigned struct_statfs64_sz = sizeof(struct statfs64);
 :info:build                                               ^
 :info:build [ 16%] Copying cfi_blacklist.txt...
 :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/build/projects/compiler-rt/lib/cfi && /opt/local/bin/cmake -E copy_if_different /opt/local/var/macports/build/_opt_local_ var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/llvm-project/llvm/projects/compiler-rt/lib/cfi/cfi_blacklist.txt /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports _lang_llvm-devel/clang-devel/work/build/./lib/clang/11.0.0/share/cfi_blacklist.txt
 :info:build 2 errors generated.
 :info:build make[2]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/sanitizer_platform_limits_posix.cpp.o] Error 1
 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/build'
 :info:build make[1]: *** [projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.osx.dir/all] Error 2
 :info:build make[1]: *** Waiting for unfinished jobs....
 :info:build [ 16%] Building CXX object utils/TableGen/CMakeFiles/obj.llvm-tblgen.dir/InstrInfoEmitter.cpp.o

...

 :info:build make: *** [all] Error 2
 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/build'
 :info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-devel/clang-devel/work/build" && /usr/bin/make -j8 -w all VERBOSE=ON-
 :info:build Exit code: 2
 :error:build Failed to build clang-devel: command execution failed
 :debug:build Error code: CHILDSTATUS 62223 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_lang_llvm-devel/clang-devel/main.log for details.

comment:21 Changed 3 years ago by wisehaus

Attempted to build clang-devel on Big Sur, but was unsuccessful. Build log attached,

comment:22 in reply to:  18 Changed 3 years ago by Tommaso93

Replying to kencu:

Replying to Tommaso93:

Using the new clang-11, will be possible to run ports that have the dependency on clang-9?

That would be the idea...

clang-9.0 seems to have been used in many places, so if we can patch it to build on BigSur, all the better for right now.

Otherwise we'll have to change all the clang-9.0 references in various other ports to some newer clang, on the systems that can build the newer clang, etc. A larger project, and then we'd have to sort out the wreckage, if any.

Try building the clang-devel that I updated yesterday, and please report back if that builds on BigSur.

I tried building using clang-devel but it does not work as well. The log file is attached.

Changed 3 years ago by Tommaso93

Attachment: main_clang-devel.log added

comment:23 Changed 3 years ago by cjones051073 (Chris Jones)

clang-devel builds fine for me on BigSur.

tommasco93 - Please make sure your ports tree is up to date. your log for clang-devel shows you are building an out of date version

clang-devel-20200531

thats a version from may this year... you should instead be building

Oberon-macOS-11 ~/Projects/MacPorts/ports > port info clang-devel
clang-devel @20201115-6ddc2377 (lang)

see the date is instead from November...

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:24 in reply to:  12 Changed 3 years ago by cjones051073 (Chris Jones)

Replying to Tommaso93:

I also have the clang-9.0 issue that is required by R and also root6.

root6 does not (in its default build) depend on clang-{9,10}

Oberon-macOS-11 ~/Projects/MacPorts/ports > port rdeps root6 | grep clang
Oberon-macOS-11 ~/Projects/MacPorts/ports > 

if you are finding it is required in your build, you must have a non-default variant or something activated to cause it. Find that and remove it.

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:25 Changed 3 years ago by cjones051073 (Chris Jones)

Port: clang-10 added

comment:26 in reply to:  23 Changed 3 years ago by Tommaso93

Replying to cjones051073:

clang-devel builds fine for me on BigSur.

tommasco93 - Please make sure your ports tree is up to date. your log for clang-devel shows you are building an out of date version

clang-devel-20200531

thats a version from may this year... you should instead be building

Oberon-macOS-11 ~/Projects/MacPorts/ports > port info clang-devel
clang-devel @20201115-6ddc2377 (lang)

see the date is instead from November...

I have the ports tree updated, but the version that is fetched is llvm-devel-20200531. In the GitHub page of the port, this version is set on the Portfile.

comment:27 Changed 3 years ago by tiperiu

clang-devel also fails for me, but it fetches clang-devel-20200531 I just reinstalled from scratch macports and also I did a selfupdate but still maps at that version and not 20201115

Not sure what I need to do to get the newer one

comment:28 in reply to:  27 Changed 3 years ago by kencu (Ken)

Replying to tiperiu:

Not sure what I need to do to get the newer one

taking some time rolling out I guess. You could do this if you're in a big hurry:

cd /Users/Shared
git clone https://github.com/macports/macports-ports.git
cd macports-ports/lang/llvm-devel
sudo port -v install subport=llvm-devel
sudo port -v install subport=clang-devel
cd ~
Last edited 3 years ago by kencu (Ken) (previous) (diff)

comment:29 Changed 3 years ago by Chris Jones <jonesc@…>

Resolution: fixed
Status: assignedclosed

In de3b2c09de90fdb69c5bdc1ba14444d9e92c2eba/macports-ports (master):

clang-{9.0,10}: Fix (x86_64) Darwin20 builds
Closes: #61477

comment:30 Changed 3 years ago by thermalecology

clang-9.0 now builds but when compiling R:

checking for gcc... /opt/local/bin/clang-mp-9.0

checking whether the C compiler works... no

configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_R/R/work/R-4.0.3':

configure: error: C compiler cannot create executables

Last edited 3 years ago by thermalecology (previous) (diff)

comment:31 Changed 3 years ago by cjones051073 (Chris Jones)

Cc: cjones051073 added

comment:32 Changed 3 years ago by cjones051073 (Chris Jones)

Thats probably an issue with R, not clang. Please file a separate ticket for that.

comment:33 Changed 3 years ago by jhoyt4

Why was this ticket closed? clang-9.0 still does not build on Big Sur / Xcode 12.2 seen new attached log. It is still needed for qt5 - which is what I discovered the issue when I wrote the original ticket (before the R crowd joined in).

I have confirmed that clang-devel does build.

Last edited 3 years ago by jhoyt4 (previous) (diff)

Changed 3 years ago by jhoyt4

Attachment: main.3.log added

latest failed build log for clang-9.0

comment:34 Changed 3 years ago by cjones051073 (Chris Jones)

clang-9.0 does now build on Big Sur. I tested it before I submitted the update above.

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:35 Changed 3 years ago by cjones051073 (Chris Jones)

the log you just submitted still has

:info:build [ 27%] Built target LTO_exports
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_llvm-9.0/clang-9.0/work/llvm-9.0.1.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc:169:31: error: invalid application of 'sizeof' to an incomplete type 'struct stat64'
:info:build   unsigned struct_stat64_sz = sizeof(struct stat64);

which tells me it was run without the fix submitted above.

comment:36 Changed 3 years ago by jhoyt4

I literally just did a "port selfupdate", "port clean --dist llvm-9.0 clang-9.0" and attempted to install. The ports tree seems to be slow in updating from git.

I will try again later when the ports tree finally propogates the update

comment:37 Changed 3 years ago by cjones051073 (Chris Jones)

Please, before anyone else submits incorrect 'still doesn't work' reports, make sure your port tree is up to date

sudo port sync

then *manually* check to make sure the llvm-{9.0/10} PortFile has the changes in the diff

https://github.com/macports/macports-ports/commit/de3b2c09de90fdb69c5bdc1ba14444d9e92c2eba

only once it does try building / installing again.

comment:38 Changed 3 years ago by cjones051073 (Chris Jones)

Personally I recommend working from a direct git clone of the ports tree and not rely on the tarball, which can take a short while to update (and seems to be particularly slow right now). i.e.

Oberon-macOS-11 ~/Downloads > tail /opt/local/etc/macports/sources.conf 
# If an "rsync://" URL points to a .tar file, a signed .rmd160 file must
# exist in the same directory on the server and will be used to verify
# its integrity.
#
# For proper functionality of various resources (port groups, mirror
# sites, etc.), the primary MacPorts source must always be tagged
# "[default]", even if switched from the default "rsync://" URL.

#rsync://rsync.macports.org/macports/release/tarballs/ports.tar [default]
file:///Users/chris/Projects/MacPorts/ports [default]

where that second path is then a direct git clone of https://github.com/macports/macports-ports

this has numerous benefits, one of which is you are working direct from git, so get updates the moment they are committed.

comment:39 Changed 3 years ago by jhoyt4

thanks for the help

After syncing the ports tree (wow that took a while) I have managed to compile clang-9.0.

comment:40 Changed 3 years ago by cjones051073 (Chris Jones)

The first time you sync after switching to a git clone, portindex has to process the whole tree, which will take a while. Subsequent runs will be a lot lot faster, as then only updates need processing.

b.t.w. to see more of what is happening, run

sudo port -d sync

thats what I tend to use...

comment:41 Changed 3 years ago by tiperiu

clang-9.0 works for me now - yey!

comment:42 Changed 3 years ago by thermalecology

So clang-9.0 builds but it's triggering build fails when trying to compile packages in R or when trying to compile scipy:

clang: clang: error: error: invalid version number in '-mmacosx-version-min=11.0'

comment:43 in reply to:  42 Changed 3 years ago by cjones051073 (Chris Jones)

Replying to thermalecology:

So clang-9.0 builds but it's triggering build fails when trying to compile packages in R or when trying to compile scipy:

clang: clang: error: error: invalid version number in '-mmacosx-version-min=11.0'

thats a problem with R, not clang. Please file a separate ticket for it.

comment:44 Changed 3 years ago by cjones051073 (Chris Jones)

Sorry. Mis-read your post.

The errors you quote will be fixed once the changes in

https://trac.macports.org/ticket/61525

are merged.

Note: See TracTickets for help on using tickets.