Opened 3 years ago

Last modified 3 years ago

#64939 assigned defect

Add muniversal PortGroup to libusb

Reported by: barracuda156 Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, leopard, ppc64 Cc:
Port: libusb

Description

Otherwise +universal gets ignored on Leopard. With muniversal 1.0 being added, the port builds:

36-109:~ svacchanda$ port -v installed libusb
The following ports are currently installed:
  libusb @1.0.23_0+universal requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-02-13T13:28:21+0800'
  libusb @1.0.25_0 requested_variants='' platform='darwin 9' archs='ppc' date='2022-04-06T00:43:50+0800'
  libusb @1.0.25_0+universal (active) requested_variants='+universal' platform='darwin 9' archs='ppc ppc64' date='2022-04-06T00:50:47+0800'
  1. S. If anyone will test this on PowerPC, you will likely also need to add a pragma patch: https://trac.macports.org/ticket/64408

Attachments (1)

patch-gcc-pragma-options-align-reset.diff (363 bytes) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by barracuda156

comment:1 Changed 3 years ago by barracuda156

Owner: set to michaelld
Status: newassigned

comment:2 in reply to:  description ; Changed 3 years ago by jmroot (Joshua Root)

Replying to barracuda156:

Otherwise +universal gets ignored on Leopard.

That is a very vague statement; you need to describe precisely what the expected and actual behaviours were.

comment:3 in reply to:  2 Changed 3 years ago by barracuda156

Replying to jmroot:

Replying to barracuda156:

Otherwise +universal gets ignored on Leopard.

That is a very vague statement; you need to describe precisely what the expected and actual behaviours were.

Without muniversal the port is built for a single arch despite +universal call:

36-109:~ svacchanda$ sudo port -v -n build libusb +universal
--->  Computing dependencies for libusb.
--->  Fetching distfiles for libusb
--->  Verifying checksums for libusb
--->  Checksumming libusb-1.0.25.tar.gz
--->  Extracting libusb
--->  Extracting libusb-1.0.25.tar.gz
Executing:  cd "/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/libusb/libusb-1.0.25.tar.gz' | /usr/bin/gnutar --no-same-owner -xf - 
--->  Applying patches to libusb
--->  Applying patch-gcc-pragma-options-align-reset.diff
Executing:  cd "/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-1.0.25" && /usr/bin/patch -p0 < '/opt/PPCLeopardPorts/devel/libusb/files/patch-gcc-pragma-options-align-reset.diff'
patching file libusb/os/darwin_usb.h
--->  Configuring libusb
Executing:  cd "/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-1.0.25" && ./autogen.sh --prefix=/opt/local 
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: /opt/local/bin/aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: /opt/local/bin/glibtoolize --copy --force
glibtoolize: putting auxiliary files in '.'.
glibtoolize: copying file './ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: /opt/local/bin/aclocal --force -I m4
autoreconf: running: /opt/local/bin/autoconf --force
autoreconf: running: /opt/local/bin/autoheader --force
autoreconf: running: /opt/local/bin/automake --add-missing --copy --force-missing
configure.ac:23: installing './compile'
configure.ac:27: installing './config.guess'
configure.ac:27: installing './config.sub'
configure.ac:26: installing './install-sh'
configure.ac:26: installing './missing'
Makefile.am: installing './INSTALL'
examples/Makefile.am: installing './depcomp'
autoreconf: Leaving directory '.'
checking for gcc... /opt/local/bin/gcc-mp-7
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /opt/local/bin/gcc-mp-7 accepts -g... yes
checking for /opt/local/bin/gcc-mp-7 option to enable C11 features... none needed
checking whether /opt/local/bin/gcc-mp-7 understands -c and -o together... yes
checking whether the compiler supports GNU C++... yes
checking whether /opt/local/bin/g++-mp-7 accepts -g... yes
checking for /opt/local/bin/g++-mp-7 option to enable C++11 features... none needed
checking for inline... inline
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of /opt/local/bin/gcc-mp-7... gcc3
checking dependency style of /opt/local/bin/g++-mp-7... gcc3
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc-apple-darwin9.8.0
checking how to print strings... printf
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for grep that handles long lines and -e... /opt/local/bin/ggrep
checking for egrep... /opt/local/bin/ggrep -E
checking for fgrep... /opt/local/bin/ggrep -F
checking for ld used by /opt/local/bin/gcc-mp-7... /opt/local/bin/ld
checking if the linker (/opt/local/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -p
checking the name lister (/usr/bin/nm -p) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert powerpc-apple-darwin9.8.0 file names to powerpc-apple-darwin9.8.0 format... func_convert_file_noop
checking how to convert powerpc-apple-darwin9.8.0 file names to toolchain format... func_convert_file_noop
checking for /opt/local/bin/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -p output from /opt/local/bin/gcc-mp-7 object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /opt/local/bin/gcc-mp-7 supports -fno-rtti -fno-exceptions... no
checking for /opt/local/bin/gcc-mp-7 option to produce PIC... -fno-common -DPIC
checking if /opt/local/bin/gcc-mp-7 PIC flag -fno-common -DPIC works... yes
checking if /opt/local/bin/gcc-mp-7 static flag -static works... no
checking if /opt/local/bin/gcc-mp-7 supports -c -o file.o... yes
checking if /opt/local/bin/gcc-mp-7 supports -c -o file.o... (cached) yes
checking whether the /opt/local/bin/gcc-mp-7 linker (/opt/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... /opt/local/bin/g++-mp-7 -E
checking for ld used by /opt/local/bin/g++-mp-7... /opt/local/bin/ld
checking if the linker (/opt/local/bin/ld) is GNU ld... no
checking whether the /opt/local/bin/g++-mp-7 linker (/opt/local/bin/ld) supports shared libraries... yes
checking for /opt/local/bin/g++-mp-7 option to produce PIC... -fno-common -DPIC
checking if /opt/local/bin/g++-mp-7 PIC flag -fno-common -DPIC works... yes
checking if /opt/local/bin/g++-mp-7 static flag -static works... no
checking if /opt/local/bin/g++-mp-7 supports -c -o file.o... yes
checking if /opt/local/bin/g++-mp-7 supports -c -o file.o... (cached) yes
checking whether the /opt/local/bin/g++-mp-7 linker (/opt/local/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin9.8.0 dyld
checking how to hardcode library paths into programs... immediate
checking for windres... no
checking whether make supports nested variables... (cached) yes
checking if /opt/local/bin/gcc-mp-7 supports -std=gnu11... yes
checking operating system... Darwin/Mac OS X
checking for nfds_t... yes
checking for pipe2... no
checking if /opt/local/bin/gcc-mp-7 recognizes -pthread... yes
checking for library containing pthread_create... none required
checking for pthread_threadid_np... no
checking for IOKit/usb/IOUSBHostFamilyDefinitions.h... no
checking for sys/time.h... yes
checking whether OS X target version is 10.12 or later... yes
checking for clock_gettime... yes
checking for /opt/local/bin/gcc-mp-7 options needed to detect all undeclared functions... none needed
checking whether CLOCK_MONOTONIC is declared... yes
checking for pthread_condattr_setclock... no
checking whether CLOCK_REALTIME is declared... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libusb-1.0.pc
config.status: creating Makefile
config.status: creating libusb/Makefile
config.status: creating examples/Makefile
config.status: creating tests/Makefile
config.status: creating doc/Makefile
config.status: creating doc/doxygen.cfg
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
--->  Building libusb
Executing:  cd "/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-1.0.25" && /usr/bin/make -j1 -w all AM_DEFAULT_VERBOSITY=1 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-libusb-4622bfc'
/usr/bin/make  all-recursive
make[1]: Entering directory `/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-libusb-4622bfc'
Making all in libusb
make[2]: Entering directory `/opt/local/var/macports/build/_opt_PPCLeopardPorts_devel_libusb/libusb/work/libusb-libusb-4622bfc/libusb'
depbase=`echo core.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ../libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I..   -isystem/opt/local/include/LegacySupport -I/opt/local/include -std=gnu11  -Wall -Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef -Werror=uninitialized -fvisibility=hidden -pthread -pipe -Os -arch ppc -MT core.lo -MD -MP -MF $depbase.Tpo -c -o core.lo core.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I.. -isystem/opt/local/include/LegacySupport -I/opt/local/include -std=gnu11 -Wall -Wextra -Wshadow -Wunused -Wwrite-strings -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Werror=init-self -Werror=missing-prototypes -Werror=strict-prototypes -Werror=undef -Werror=uninitialized -fvisibility=hidden -pthread -pipe -Os -arch ppc -MT core.lo -MD -MP -MF .deps/core.Tpo -c core.c  -fno-common -DPIC -o .libs/core.o

Etc., ppc64 does not ever show up.

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

do you recall how in Iain’s discussion forums I mentioned a number of times that newer gcc versions would need to add an updated driverdriver.c to integrate smoothly into MacPorts universal builds?

This is an example.

Newer gcc versions support the “-arch” flag, but ignore more than one of them at present.

muniversal portgroup works around this, but has it’s own problems sometimes, so adding it to 10,000 ports to support extremely rare ppc/ppc64 universal builds is unrealistic.

fixing driverdriver.c is more realistic, and that should be done instead.

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

comment:5 in reply to:  4 Changed 3 years ago by barracuda156

Replying to kencu:

do you recall how in Iain’s discussion forums I mentioned a number of times that newer gcc versions would need to add an updated driverdriver.c to integrate smoothly into MacPorts universal builds?

Yes, "poor man's driverdriver" :)

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

Iain’s shell script was the “poor man’s driverdriver”.

The real updated driverdriver.c is the proper fix here.

Note: See TracTickets for help on using tickets.