Portfile question for 10.6.8

raf macports at raf.org
Wed Jun 7 01:09:13 UTC 2023


On Tue, Jun 06, 2023 at 08:46:56AM -0700, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:

> it looks like the legacy support library is not being included in the link.
> 
> This is common when only scripts are used, as there are many flags that might not be considered.
> 
> If you run the build on 10.6 using some extra verbosity flags like
> "-d" it will show you all the ENVVARs and LDFLAGS etc that macports
> sets. You should see the ones your script needs to account for in that
> list to get the proper legacysupport library on the link line.
> 
> K

Thanks. The main.log shows:

  Environment:
  CC='/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cc/opt/local/bin/clang-mp-11'
  CC_PRINT_OPTIONS='YES'
  CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/.CC_PRINT_OPTIONS'
  CFLAGS='-Os -I/opt/local/include/LegacySupport -arch x86_64'
  CPATH='/opt/local/include'
  CPLUS_INCLUDE_PATH='/opt/local/include/LegacySupport'
  CPPFLAGS='-I/opt/local/include -I/opt/local/include/LegacySupport'
  CXX='/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cxx/opt/local/bin/clang++-mp-11'
  CXXFLAGS='-Os -arch x86_64 -stdlib=libc++'
  C_INCLUDE_PATH='/opt/local/include/LegacySupport'
  DEVELOPER_DIR='/Developer'
  F90FLAGS='-Os -m64'
  FCFLAGS='-Os -m64'
  FFLAGS='-Os -m64'
  INSTALL='/usr/bin/install -c'
  LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -lMacportsLegacySupport -arch x86_64'
  LIBRARY_PATH='/opt/local/lib'
  MACOSX_DEPLOYMENT_TARGET='10.6'
  OBJC='/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objc/opt/local/bin/clang-mp-11'
  OBJCFLAGS='-Os -arch x86_64'
  OBJCXX='/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objcxx/opt/local/bin/clang++-mp-11'
  OBJCXXFLAGS='-Os -arch x86_64 -arch x86_64 -stdlib=libc++'
  PREFIX='/opt/local'
  Executing:  cd "/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/rawhid
  system:  cd "/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/rawhide-
  make: Entering directory `/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/w
  /opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cc/opt/local/

  :info:build Executing:  cd
  "/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/rawhide-3.1"
  && /usr/bin/make -j4 -w rh
  CC="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cc/opt/local/bin/clang-mp-11"
  CXX="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cxx/opt/local/bin/clang++-mp-11"
  OBJC="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objc/opt/local/bin/clang-mp-11"
  OBJCXX="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objcxx/opt/local/bin/clang++-mp-11"
  INSTALL="/usr/bin/install -c"

  :debug:build system:  cd
  "/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/rawhide-3.1"
  && /usr/bin/make -j4 -w rh
  CC="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cc/opt/local/bin/clang-mp-11"
  CXX="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cxx/opt/local/bin/clang++-mp-11"
  OBJC="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objc/opt/local/bin/clang-mp-11"
  OBJCXX="/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/objcxx/opt/local/bin/clang++-mp-11"
  INSTALL="/usr/bin/install -c"

  :info:build make: Entering directory
  `/opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/rawhide-3.1'

  :info:build
  /opt/local/var/macports/build/_Users_raf_macports_ports_sysutils_rawhide/rawhide/work/compwrap/cc/opt/local/bin/clang-mp-11
  -O3 -g -Wall -pedantic -DETCDIR=\"/opt/local/etc\"
  -DRAWHIDE_NAME=\"rawhide\" -DRAWHIDE_PROG_NAME=\"rh\"
  -DRAWHIDE_VERSION=\"3.1\" -DRAWHIDE_DATE=\"20221011\"  -DHAVE_PCRE2=1
  -DHAVE_ACL=1 -DHAVE_POSIX_ACL=1 -DHAVE_MACOS_ACL=1 -DHAVE_EA=1
  -DHAVE_MACOS_EA=1     -I/opt/local/include     -o rh rhcmds.o rh.o rhparse.o
  rhdir.o rhdata.o rhstr.o rherr.o -L/opt/local/lib -lpcre2-8

So it looks like I need legacysupport's CFLAGS and LDFLAGS and they're not
getting through. It's odd that I only saw linker errors, and no compiler
warnings without the CFLAGS getting through. Never mind.

I'm currently setting the CFLAGS and LDFLAGS macros myself in the (non-GNU)
Makefile, made up of a list of other *_CFLAGS and *_LDFLAGS macros.

So if I use different macro names (e.g. ALL_CFLAGS and ALL_LDFLAGS), and just
add $(CFLAGS) and $(LDFLAGS) from the environment to it, then it should work.
I'll try that.

Yay! It worked. Many thanks. I'll fix my Makefile for the upcoming version
of rawhide and create the Portfile for that.

cheers,
raf



More information about the macports-users mailing list