[MacPorts] #67681: openal-soft: opportunistic use of libsndfile (was: openal-soft +universal fails to build)

MacPorts noreply at macports.org
Sun Jun 25 08:36:55 UTC 2023


#67681: openal-soft: opportunistic use of libsndfile
--------------------------+------------------------
  Reporter:  atalkingegg  |      Owner:  ryandesign
      Type:  defect       |     Status:  accepted
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.8.1
Resolution:               |   Keywords:
      Port:  openal-soft  |
--------------------------+------------------------
Changes (by ryandesign):

 * keywords:  i386 =>
 * status:  assigned => accepted


Old description:

> "port install openal-soft" works fine.
> "port install wine" asks for a "+universal" ?? variant of openal-soft (if
> available, which it is), which adds a "-arch i386" compiler flag, which
> creates warnings "ld: warning: The i386 architecture is deprecated for
> macOS (remove from the Xcode build setting: ARCHS)", but when linking
> creates the error "Undefined symbols for architecture i386:", (_sf_close,
> sf_command, _sf_open, _sf_readf_float).
>
> macOS 10.13.6 17G14042
> Xcode 10.1 10B
>
> "port -s install openal-soft" works.
> "port -s install openal-soft +universal" fails.
>
> Suggested fix: remove broken +universal from openal-soft on High Sierra,
> or track down missing i386 linked file.

New description:

 `port install openal-soft` works fine. \\
 `port install wine` asks for a "+universal" ?? variant of openal-soft (if
 available, which it is), which adds a `-arch i386` compiler flag, which
 creates warnings `ld: warning: The i386 architecture is deprecated for
 macOS (remove from the Xcode build setting: ARCHS)`, but when linking
 creates the error `Undefined symbols for architecture i386:`, (_sf_close,
 sf_command, _sf_open, _sf_readf_float).

 macOS 10.13.6 17G14042 \\
 Xcode 10.1 10B

 `port -s install openal-soft` works. \\
 `port -s install openal-soft +universal` fails.

 Suggested fix: remove broken +universal from openal-soft on High Sierra,
 or track down missing i386 linked file.

--

Comment:

 The `_sf_` symbols are from libsndfile. openal-soft doesn't declare a
 dependency on libsndfile, but it looks like openal-soft tries to use
 libsndfile anyway if you already had it installed. That would be a bug
 that I would need to fix. The undefined symbols are being encountered when
 compiling uhjencoder.cpp and that file only gets compiled
 [https://github.com/kcat/openal-
 soft/blob/d3875f333fb6abe2f39d82caca329414871ae53b/CMakeLists.txt#L1577-L1595
 when libsndfile is found].

 If you already had libsndfile installed for x86_64 only but were trying to
 build openal-soft universal (for both x86_64 and i386), that would explain
 the message "Undefined symbols for architecture i386" in regard to these
 symbols.

 We usually want to see the entire main.log to analyze a problem. It might
 show us something like "libsndfile found" that would confirm such a
 diagnosis. In this case, though, I'm confident I've identified what
 happened so a log is no longer necessary.

 What happened after you filed this ticket is that Josh forced a build of
 wine's dependencies with the universal variant on our macOS 10.13 build
 machine to see if it encountered the same problem you did. It didn't, and
 so a binary archive of openal-soft with the universal variant became
 available. Binary archives are normally only produced with a port's
 default set of variants, which does not normally include the universal
 variant.

 I'm not sure why a from-source build now succeeds for you as well unless
 you either uninstalled libsndfile or installed libsndfile with the
 universal variant.

-- 
Ticket URL: <https://trac.macports.org/ticket/67681#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list