Opened 4 years ago
Last modified 3 years ago
#61858 assigned defect
libunistring: build fails due to failing configure checks
Reported by: | chhil (Murtuza Chhil) | Owned by: | ci42 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | libunistring |
Description
Using https://distfiles.macports.org/MacPorts/MacPorts-2.6.4_1-11-BigSur.pkg
Installing git errors out. sudo port install git
Error: Failed to build libunistring: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port git failed
From the log file generated
:info:build In file included from ./stdint.h:114: :info:build In file included from ./sys/types.h:48: :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/types.h:170: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/_types/_useconds_t.h:31:33: error: cannot combine with previous 'type-name' declaration specifier :info:build typedef __darwin_useconds_t useconds_t; :info:build ^ :info:build ./../config.h:2170:29: note: expanded from macro 'useconds_t' :info:build #define useconds_t unsigned int :info:build ^ :info:build In file included from amemxfrm.c:33: :info:build In file included from ./stdlib.h:45: :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/stdlib.h:66: :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/wait.h:110: :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/resource.h:72: :info:build In file included from ./stdint.h:114: :info:build In file included from ./sys/types.h:48: :info:build In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/types.h:170: :info:build /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/_types/_useconds_t.h:31:33: error: 'type-name' cannot be signed or unsigned :info:build ./../config.h:2170:20: note: expanded from macro 'useconds_t' :info:build #define useconds_t unsigned int :info:build ^ :info:build 9 errors generated. :info:build make[2]: *** [config.h] 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_textproc_libunistring/libunistring/work/libunistring-0.9.10/lib' :info:build make[1]: *** [all-recursive] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/work/libunistring-0.9.10' :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_textproc_libunistring/libunistring/work/libunistring-0.9.10' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/work/libunistring-0.9.10" && /usr/bin/make -j8 -w all :info:build Exit code: 2 :error:build Failed to build libunistring: command execution failed :debug:build Error code: CHILDSTATUS 86213 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_textproc_libunistring/libunistring/main.log for details.
Attachments (3)
Change History (25)
Changed 4 years ago by chhil (Murtuza Chhil)
comment:1 Changed 4 years ago by jmroot (Joshua Root)
Owner: | set to ci42 |
---|---|
Status: | new → assigned |
Why is MACOSX_DEPLOYMENT_TARGET set to 10.7?
comment:2 Changed 4 years ago by jmroot (Joshua Root)
:info:configure checking for useconds_t... no
This configure check seems to be producing an incorrect result; please attach the config.log as well.
comment:3 Changed 4 years ago by chhil (Murtuza Chhil)
Why is MACOSX_DEPLOYMENT_TARGET set to 10.7?
Following build instructions for an app. https://github.com/darktable-org/darktable/blob/master/packaging/macosx/BUILD.txt#L6
please attach the config.log
I am new to MacOS and macports environment, please could you provide a mor specific location to find this file you are requesting?
Changed 4 years ago by chhil (Murtuza Chhil)
Attachment: | config.log added |
---|
Attched file is from /opt/local/varmacports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/work/libunistring-0.9.10/config.log
comment:4 follow-up: 20 Changed 4 years ago by jmroot (Joshua Root)
Keywords: | git libunistring removed |
---|---|
Port: | libunistring added; git removed |
Summary: | git : install fails → libunistring: build fails due to failing configure checks |
You're also building for x86_64 on an ARM system. Cross-compiling is tricky at the best of times.
There seems to be a cascade of errors in the configure script, each causing later checks to fail, starting with this:
configure:24350: checking for pid_t configure:24350: /usr/bin/clang -c -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch x86_64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk conftest.c >&5 In file included from conftest.c:126: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/types.h:81: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/machine/endian.h:35: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/i386/endian.h:99: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/_endian.h:130: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/_OSByteOrder.h:80: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/arm/OSByteOrder.h:15:1: error: redefinition of '_OSSwapInt16' _OSSwapInt16( ^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/i386/_OSByteOrder.h:46:1: note: previous definition is here _OSSwapInt16( ^
Including both arm and i386 versions of the headers isn't going to work very well, naturally.
comment:5 Changed 4 years ago by chhil (Murtuza Chhil)
Including both arm and i386 versions of the headers isn't going to work very well, naturally.
Could you guide me or provide pointers on how to get to building for the right architecture on my M1? I assume it needs to be arm only. I did try changing build_arch in the macports.conf to amd64 and got the same errors.
comment:6 Changed 4 years ago by kencu (Ken)
darktable is a port in macports, but it does not appear to have been well cared for lately, based on this build history here <https://ports.macports.org/port/darktable/builds>. So there is no guarantee at this moment that it will build. Also, arm64 Macs have been out for only about a month, represent a brand new architecture, and there will be lots of teething pains yet to be found. Unfortunately the maintainer listed for darktable, although very skilled, has been absent from MacPorts for 1/2 a year now, and we have no information if or when he'll be back here again.
I only say that so you know where you're starting from and your expectations are realistic.
No walkthrough currently on the internet is going to be very useful, especially on arm64 macs, and especially one that tells you to set the deployment target to 10.7, which is a decade old, and only supported Intel processors. So to be honest, let's take that with grain of salt.
So let's start fully fresh. Completely erase all your MacPorts installation:
sudo port -fp uninstall installed
and then:
$ sudo rm -rf \ /opt/local \ /Applications/DarwinPorts \ /Applications/MacPorts \ /Library/LaunchDaemons/org.macports.* \ /Library/Receipts/DarwinPorts*.pkg \ /Library/Receipts/MacPorts*.pkg \ /Library/StartupItems/DarwinPortsStartup \ /Library/Tcl/darwinports1.0 \ /Library/Tcl/macports1.0 \ ~/.macports
Then install MacPorts from the arm64 installer, using only Apple's Terminal.app and no other shell.
Make sure you have both the current Xcode installed and the current Command Line Tools installed. Be as certain as you can about this -- if they don't match, you are doomed.
Now don't touch a single thing in the defaults -- don't use a different install directory, don't uee a different shell, don't try to install your ports to a symlinked external USB drive, don't touch a thing in macports.conf or any other *.conf file, don't do a single thing that is other than a totally garden-variety, standard, run-of-the-mill MacPorts default installation.
Your best bet is to go down the well-trodden (as it is ...) path at this point.
Then just give it a try:
sudo port -v install darktable
and report build errors and failures as they come up, port by port. There are certain to be some, as we have no reports of anyone installing DarkTable on an arm64 Mac ever so far.
comment:7 Changed 4 years ago by chhil (Murtuza Chhil)
Extremely thankful for your patience and for following up. I will follow instructions and report back.
comment:8 Changed 4 years ago by chhil (Murtuza Chhil)
Restarting fresh. Ports uninstalled, files removed as requested. XCode installed using app store.
/usr/bin/xcodebuild -version Xcode 12.3 Build version 12C33
Commandline tools 12.3 installed from apple developer website. Macports installed for BigSur. Default conf files (whatever was installed)
Error :
---> Computing dependencies for darktable................................................................................................................................................................................................................................................... Error: Cannot install ffmpeg for the archs 'arm64 x86_64' because Error: its dependency libvpx only supports the archs 'x86_64 i386'. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port darktable failed
comment:9 Changed 4 years ago by kencu (Ken)
ok, that's going to be the first hurdle then.
BTW, the prebuilt dmg from the darktable website might just work right now as it is, under rosetta, while the arm build gets sorted out.
comment:10 Changed 4 years ago by kencu (Ken)
I am a bit surprised that macports is right off the bat trying to build it as a universal binary....that we will have to shut down I think,as that will be an order of magnitude more complicated to accomplish...
comment:11 Changed 4 years ago by chhil (Murtuza Chhil)
Yes, the pre-built one works and have it installed. I simply wanted to be on the current master instead of just the released version).
bit surprised that macports is right off ...
I might have screwed up here. I noticed some edited conf files were open in an editor and just did not get deleted. So I redid the
sudo port -v install darktable
Before redoing it (the previous run) took a long time before it failed. The following is from line 135875 from the log. I will attach the output log if it helps.
---> Cleaning texinfo ---> Removing work directory for texinfo Error: Requested variants "+universal" do not match those the build was started with: "". Error: Please use the same variants again, or run 'port clean libunistring' first to remove the existing partially completed build. Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_textproc_libunistring/libunistring/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port darktable failed
Changed 4 years ago by chhil (Murtuza Chhil)
Attachment: | macports.out.zip added |
---|
Output of installing port darktable. This was before I realized maybe the conf files that were open in the editor had not been deleted.
comment:12 Changed 4 years ago by kencu (Ken)
I had a go at building darktable on Catalina.
First thing I can tell you is that it is set up to only build properly in the +quartz variant.
I fixed it to the point where the x11 variant would build (this is the default for MacPorts) and run, but there are no visible menus -- otherwise it works. I'll check that out and consider pushing it if that x11 fix is correct.
comment:13 Changed 4 years ago by kencu (Ken)
I installed the upstream pre-built DMG version, and it doesn't have any menus either, so I guess that is how darktable's interface is set up.
So I pushed a minor tweak to allow it to build x11, which should make it a bit easier for people to get going.
comment:14 Changed 4 years ago by chhil (Murtuza Chhil)
Thanks Ken.
I had another go with
sudo port -v install darktable Password: ---> Computing dependencies for darktable................................................................................................................................................................................................................................................... Error: Cannot install ffmpeg for the archs 'arm64 x86_64' because Error: its dependency libvpx only supports the archs 'x86_64 i386'. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port darktable failed
comment:15 Changed 4 years ago by kencu (Ken)
yes, I will have to see if anyone has fixed libvpx for arm64 yet. libvpx is an optional dependency for ffmpeg I recall, so you could just delete that from the ffmpeg Portfile and keep going I think...
comment:16 Changed 4 years ago by kencu (Ken)
Here you are:
% port -v installed ffmpeg The following ports are currently installed: ffmpeg @4.3.1_0+gpl2-x11 (active) platform='darwin 20' archs='arm64' date='2020-12-20T00:35:30-0500'
Just delete libvpx
and the configure argument that enables libvpx
and that's all you have to do. I'll push something about that.
libvpx will no doubt be able to build on arm64 macs -- there is a target for that -- but our Portfile will need tweaking I guess to make that happen.
comment:17 Changed 4 years ago by kencu (Ken)
I still don't understand why you are trying to build everything +universal, by the way...
comment:18 Changed 4 years ago by chhil (Murtuza Chhil)
Sorry, for some reason I stopped getting notification emails for this ticket. I just wanted to check and came across the updates. I will try
Just delete libvpx and the configure argument that enables libvpx and that's all you have to do.
I hope I can figure it out :)
comment:19 Changed 4 years ago by frgazor
Hi,
I'm also trying to install darktable on my m1 air. Off course as a total n00b with mac and macports I'm not very successful.
First I did this and removed libvpx from libs and configure part:
sudo port edit --editor nano ffmpeg
Now ffmpeg builds and install just fine.
Next I do this:
sudo port -v install darktable
Many dependencies are successfully installed and then it fails trying to build ossp-uuid:
---> Computing dependencies for ossp-uuid. ---> Fetching archive for ossp-uuid ---> ossp-uuid-1.6.2_11+perl5_28+universal.darwin_20.arm64-x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified ---> Attempting to fetch ossp-uuid-1.6.2_11+perl5_28+universal.darwin_20.arm64-x86_64.tbz2 from https://packages.macports.org/ossp-uuid % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 ---> Attempting to fetch ossp-uuid-1.6.2_11+perl5_28+universal.darwin_20.arm64-x86_64.tbz2 from https://lil.fr.packages.macports.org/ossp-uuid % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 ---> Attempting to fetch ossp-uuid-1.6.2_11+perl5_28+universal.darwin_20.arm64-x86_64.tbz2 from https://cph.dk.packages.macports.org/ossp-uuid % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 ---> Configuring ossp-uuid ---> Configuring ossp-uuid for architecture arm64 Executing: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ossp-uuid/ossp-uuid/work/uuid-1.6.2-arm64" && ./configure --prefix=/opt/local --without-php --without-pgsql --includedir=/opt/local/include/ossp --with-perl --with-perl-compat --host=aarch64-apple-darwin20.2.0 configure: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used. shtool:echo:Warning: unable to determine terminal sequence for bold mode Configuring OSSP uuid (Universally Unique Identifier), version 1.6.2 (04-Jul-2008) checking whether make sets $(MAKE)... yes checking for aarch64-apple-darwin20.2.0-gcc... /usr/bin/clang checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether /usr/bin/clang accepts -g... yes checking for /usr/bin/clang option to accept ISO C89... none needed checking for compilation debug mode... disabled checking how to run the C preprocessor... /usr/bin/clang -E checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether to build against external Dmalloc library... no checking build system type... arm-apple-darwin20.2.0 checking host system type... Invalid configuration `aarch64-apple-darwin20.2.0': machine `aarch64-apple' not recognized configure: error: /bin/sh ./config.sub aarch64-apple-darwin20.2.0 failed Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ossp-uuid/ossp-uuid/work/uuid-1.6.2-arm64" && ./configure --prefix=/opt/local --without-php --without-pgsql --includedir=/opt/local/include/ossp --with-perl --with-perl-compat --host=aarch64-apple-darwin20.2.0 Exit code: 1 Error: Failed to configure ossp-uuid, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ossp-uuid/ossp-uuid/work/uuid-1.6.2-arm64/config.log Error: Failed to configure ossp-uuid: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ossp-uuid/ossp-uuid/main.log for details. Error: Unable to execute port: upgrade cairo failed
comment:20 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to jmroot:
There seems to be a cascade of errors in the configure script, each causing later checks to fail, starting with this:
configure:24350: checking for pid_t configure:24350: /usr/bin/clang -c -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -arch x86_64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk conftest.c >&5 In file included from conftest.c:126: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/types.h:81: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/machine/endian.h:35: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/i386/endian.h:99: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/sys/_endian.h:130: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/_OSByteOrder.h:80: /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/arm/OSByteOrder.h:15:1: error: redefinition of '_OSSwapInt16' _OSSwapInt16( ^ /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/usr/include/libkern/i386/_OSByteOrder.h:46:1: note: previous definition is here _OSSwapInt16( ^Including both arm and i386 versions of the headers isn't going to work very well, naturally.
Right, but what is causing that to happen? Same issue reported in gtime in #62013 and gmake in #62822.
comment:21 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign added |
---|
comment:22 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Same issue reported in grep in #64135.
Log file that was generated