Opened 4 years ago

Closed 4 years ago

#61431 closed defect (fixed)

openal-soft @1.21.0: error: inline declaration of 'PopCount<unsigned long long>' follows non-inline definition

Reported by: thetrial (alabay) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: elcapitan yosemite Cc: Blokkendoos (Johan), DaveStrickland (Dave Strickland), mascguy (Christopher Nielsen), metbic
Port: openal-soft

Description

openal-soft won’t build under El Capitan.

Due to I don’t know where the problem starts, I’ll attach the logfile.

Attachments (4)

main.log (119.4 KB) - added by thetrial (alabay) 4 years ago.
Logfile.
patch-openal-soft-alnumeric.h.diff (2.8 KB) - added by Blokkendoos (Johan) 4 years ago.
openal-soft-1.21_0-mp-build-10.10_x64-20210112-failure.txt.gz (7.7 KB) - added by mascguy (Christopher Nielsen) 4 years ago.
filename main.log (789.9 KB) - added by metbic 4 years ago.

Download all attachments as: .zip

Change History (46)

Changed 4 years ago by thetrial (alabay)

Attachment: main.log added

Logfile.

comment:1 Changed 4 years ago by thetrial (alabay)

Keywords: i386 added

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: yosemite added; legacy-os i386 removed
Status: assignedaccepted
Summary: openal-soft @ 1.21.0_0.darwin_15.x86_64: Failed to build – Error code: CHILDSTATUS 56180 2openal-soft @1.21.0: error: inline declaration of 'PopCount<unsigned long long>' follows non-inline definition

Thanks for reporting it. The error in the log is:

error: inline declaration of 'PopCount<unsigned long long>' follows non-inline definition

I see the same problem on our 10.10 and 10.11 build machines.

It built fine on 10.9 and earlier because on those old versions we use a newer MacPorts clang compiler. So worst case we can use a newer MacPorts clang on 10.10 and 10.11 too.

comment:3 Changed 4 years ago by Blokkendoos (Johan)

Cc: Blokkendoos added

Changed 4 years ago by Blokkendoos (Johan)

comment:4 Changed 4 years ago by Blokkendoos (Johan)

Workaround in attached patchfile; patch-openal-soft-alnumeric.h.

It just makes the port compile so that 'port upgrade outdated' can complete. I haven't tested openal functionality. I am not a developer.

This works on OS X 10.11 on a 2009 Macbook Pro.

Last edited 4 years ago by Blokkendoos (Johan) (previous) (diff)

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Thank you, but I'm not experienced enough to evaluate the proposed patch. Did it come from the developers of openal-soft? If so, what is the URL of their version? Or if you developed the patch, have you reported it to the developers of openal-soft? What is the URL of that report? I would want to know that the developers of openal-soft concur that this is the correct fix before I add it to the port.

comment:6 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Johan, could you let me know about my questions above?

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

Personally I'd just bump the compiler rather than get this deep into making the code work with old clang versions, but up to you.

comment:8 Changed 4 years ago by thetrial (alabay)

In cases like these … when waiting … there seems no commmand to exclude a port from updating? »and not« seems to be an urban legend :-)

comment:9 Changed 4 years ago by DaveStrickland (Dave Strickland)

Cc: DaveStrickland added

comment:10 in reply to:  7 ; Changed 4 years ago by metbic

Replying to kencu:

Personally I'd just bump the compiler rather than get this deep into making the code work with old clang versions, but up to you.

Wouldn't that mean also all the other ports made with clang would need a new round of compilation?

-

Replying to thetrial:

In cases like these … when waiting … there seems no commmand to exclude a port from updating? »and not« seems to be an urban legend :-)

and even that would be too late, I guess, since when trying to fix it, I uninstalled it. Does anyone know a syntax to specifically enforce an older version during 'upgrade outdated'?

comment:11 Changed 4 years ago by metbic

I took this thread as an issue to the openal-soft github page, and got this answer:

https://github.com/kcat/openal-soft/issues/512#issuecomment-753404919

comment:12 Changed 4 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:13 Changed 4 years ago by mascguy (Christopher Nielsen)

Let's bump the compiler, rather than maintaining another patch. Currently testing portfile changes, with a pull request to follow later today...

comment:14 Changed 4 years ago by mascguy (Christopher Nielsen)

Draft pull requested created, pending more tests across macOS releases:

https://github.com/macports/macports-ports/pull/9682

comment:15 Changed 4 years ago by mascguy (Christopher Nielsen)

Finally tested on macOS 10.10 and 10.11, and can confirm that the changes fix the build failures. Updated status of PR from draft, to ready for review.

comment:16 in reply to:  8 ; Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to thetrial:

In cases like these … when waiting … there seems no commmand to exclude a port from updating? »and not« seems to be an urban legend :-)

Not an urban legend. To exclude openal-soft, sudo port upgrade outdated and not openal-soft. If any of the other outdated ports depend on openal-soft, then openal-soft will still be attempted to be updated. To counteract that, exclude those ports as well, e.g. sudo port upgrade outdated and not \( openal-soft a-port-that-depends-on-openal-soft another-port-that-depends-on-openal-soft \).

comment:17 in reply to:  10 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to metbic:

Wouldn't that mean also all the other ports made with clang would need a new round of compilation?

No, why would it mean that?

and even that would be too late, I guess, since when trying to fix it, I uninstalled it. Does anyone know a syntax to specifically enforce an older version during 'upgrade outdated'?

Enforce an older version of what? Of a port? See wiki:howto/InstallingOlderPort.

comment:18 in reply to:  13 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to mascguy:

Let's bump the compiler, rather than maintaining another patch. Currently testing portfile changes, with a pull request to follow later today...

If upstream has a patch that works, I want to use that.

comment:19 Changed 4 years ago by mascguy (Christopher Nielsen)

Hmmmm, I was just getting ready to force-push the change from compiler.whitelist, to a patch... and update the PR. But it's been closed?

Gee, thanks...

comment:20 Changed 4 years ago by mascguy (Christopher Nielsen)

Fresh, new-and-improved pull request created:

https://github.com/macports/macports-ports/pull/9685

comment:21 Changed 4 years ago by mascguy (Christopher Nielsen)

I'll retest against macOS 10.10 and 10.11 tomorrow.

comment:22 in reply to:  16 Changed 4 years ago by thetrial (alabay)

Replying to ryandesign:

Replying to thetrial:

In cases like these … when waiting … there seems no commmand to exclude a port from updating? »and not« seems to be an urban legend :-)

Not an urban legend. To exclude openal-soft, sudo port upgrade outdated and not openal-soft. If any of the other outdated ports depend on openal-soft, then openal-soft will still be attempted to be updated. To counteract that, exclude those ports as well, e.g. sudo port upgrade outdated and not \( openal-soft a-port-that-depends-on-openal-soft another-port-that-depends-on-openal-soft \).

Thank you. I’m goint to try this again. I haven’t found that anywhere in the documentation.

comment:23 Changed 4 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: acceptedclosed

In e2ebda7bb07a4a5dd823440f0b55d3e3544f53f0/macports-ports (master):

openal-soft: patch to fix template-related build errors

Fixes: #61431

Changed 4 years ago by mascguy (Christopher Nielsen)

comment:24 Changed 4 years ago by mascguy (Christopher Nielsen)

While the template patch fixed the build for macOS 10.11, 10.10 still appears to be failing.

This time, the compilation errors relate to thread-local storage:

/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_audio_openal-soft/openal-soft/work/openal-soft-1.21.0/alc/alc.cpp:891:1: error: thread-local storage is not supported for the current target
thread_local ALCcontext *LocalContext{nullptr};
^
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_audio_openal-soft/openal-soft/work/openal-soft-1.21.0/alc/alc.cpp:906:1: error: thread-local storage is not supported for the current target
thread_local ThreadCtx ThreadContext;
^

Full log from 10.10 builder attached:

openal-soft-1.21_0-mp-build-10.10_x64-20210112-failure.txt.gz​.

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

This is why I usually go with just forcing a newer compiler. The "keep the old compiler working" game is whack-a-mole.

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

comment:26 Changed 4 years ago by thetrial (alabay)

I still was not able to build that with the patch file. Can someone tell me step by step how to do that? When I follow the steps from the macports page I always get the message that a file was not found (line three).

comment:27 Changed 4 years ago by mascguy (Christopher Nielsen)

If you simply need a temporary fix to get this working locally, you don't have to use the patch.

Instead, change these three lines:

patchfiles              ${name}-uint64_t-header-check.patch \
                        ${name}-add-missing-include-coreaudio.patch \
                        ${name}-alnumeric-templates.patch

to

patchfiles              ${name}-uint64_t-header-check.patch \
                        ${name}-add-missing-include-coreaudio.patch

And then add the following three lines, before the one that begins with compiler.cxx_standard:

compiler.whitelist      macports-clang-9.0 \
                        macports-clang-10 \
                        macports-clang-11

That should fix the issue.

Last edited 4 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:28 Changed 4 years ago by thetrial (alabay)

It seems like it worked now. Though it was a bit bumpy in the beginning. I guess clang-9 had to be clang-9.0, with -9 I got an error, with -9.0 it ran through. Is this the onyl solution now or will that be included in the portfile officially?

comment:29 in reply to:  28 Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to thetrial:

It seems like it worked now. Though it was a bit bumpy in the beginning. I guess clang-9 had to be clang-9.0, with -9 I got an error, with -9.0 it ran through. Is this the onyl solution now or will that be included in the portfile officially?

That's up to Ryan, as he's the maintainer of this port.

comment:30 Changed 4 years ago by metbic

error persists on my machine:

--->  Attempting to fetch openal-soft-1.21.0_0.darwin_14.x86_64.tbz2 from http://fco.it.packages.macports.org/openal-soft
--->  Building openal-soft
Error: Failed to build openal-soft: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_audio_openal-soft/openal-soft/main.log for details.
Error: Problem while installing openal-soft
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Changed 4 years ago by metbic

Attachment: filename main.log added

comment:31 Changed 4 years ago by metbic

Cc: metbic added

comment:32 Changed 4 years ago by mascguy (Christopher Nielsen)

The fix committed a week ago hasn't fixed the issue, so the failures you're seeing are understandable.

Ryan, would you be willing to reconsider our approach on this one, and perhaps be open to a solution involving compiler.blacklist? I ask, as I'm worried the patch approach might take multiple - or worse, numerous - iterations, while our users remain stuck.

Your thoughts?

comment:33 Changed 4 years ago by thetrial (alabay)

I wonder, why it worked here recently?

comment:34 in reply to:  33 Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to thetrial:

I wonder, why it worked here recently?

Do you mean, using the one-off patch instructions provided to you...?

comment:35 Changed 4 years ago by thetrial (alabay)

The problem is that I really don’t know what fixed it. Patching … was not possible. You then had told me to write into the file. I don’t know if that was the solution or something that came new when I made a port upgrade. Suddenly it worked. And it worked on two machines, what makes me wonder. It looked to me as if something had changed on macports’ side. But I’ve lost the overview.

comment:36 in reply to:  35 Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to thetrial:

The problem is that I really don’t know what fixed it. Patching … was not possible. You then had told me to write into the file. I don’t know if that was the solution or something that came new when I made a port upgrade. Suddenly it worked. And it worked on two machines, what makes me wonder. It looked to me as if something had changed on macports’ side. But I’ve lost the overview.

It wasn't the patch that fixed the issue for you, but rather, the lines added to the portfile. (The ones with 'compiler.whitelist'.)

comment:37 Changed 4 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: closedreopened

comment:38 Changed 4 years ago by mascguy (Christopher Nielsen)

Here's an additional PR to fix this issue. Ryan, I left the template patch in (as it's part of upstream anyway), and simply blacklisted older clang versions:

https://github.com/macports/macports-ports/pull/9770

comment:39 Changed 4 years ago by metbic

I did the above-mentioned changes to the portfile. And then, sudo port -N install openal-soft actually worked. But then, a list of broken ports showed up and openal-soft was installed again. No clue why.

comment:40 Changed 4 years ago by metbic

Will the next port selfupdate overwrite the edited portfile with the original one?

comment:41 in reply to:  40 Changed 4 years ago by mascguy (Christopher Nielsen)

Replying to metbic:

Will the next port selfupdate overwrite the edited portfile with the original one?

Yes, it will.

But we're very, very close to pushing out our latest fix. (Possibly just a few hours, or worst-case, within 24-48 hours.) So if you folks can try to be patient, we'll get this resolved once and for all.

Last edited 4 years ago by mascguy (Christopher Nielsen) (previous) (diff)

comment:42 Changed 4 years ago by Christopher Nielsen <mascguy@…>

Resolution: fixed
Status: reopenedclosed

In 2f88cc35328aa26566ec0eb919ff1b3f3af63215/macports-ports (master):

openal-soft: fix build errors for older macOS releases

Fixes: #61431

Note: See TracTickets for help on using tickets.