Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 768246 - media-video/obs-studio-26.1.2 -stdlib=libc++: error: no viable conversion from '__bind<int &, sockaddr *, unsigned long>' to 'int'
Summary: media-video/obs-studio-26.1.2 -stdlib=libc++: error: no viable conversion fro...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Chiitoo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-01 17:01 UTC by Kenton Groombridge
Modified: 2022-02-22 20:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge -pqv (emerge-pqv.txt,219 bytes, text/plain)
2021-02-01 17:01 UTC, Kenton Groombridge
Details
emerge --info (emerge-info.txt,8.06 KB, text/plain)
2021-02-01 17:02 UTC, Kenton Groombridge
Details
build.log (build.log,322.36 KB, text/x-log)
2021-02-01 17:02 UTC, Kenton Groombridge
Details
fix building with libc++ (fix-libcxx.patch,368 bytes, patch)
2021-02-07 06:17 UTC, 12101111
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenton Groombridge gentoo-dev 2021-02-01 17:01:45 UTC
Created attachment 685446 [details]
emerge -pqv

Getting this error during compilation. This machine is a clang+llvm box, but I have reproduced this error with gcc as well.
Comment 1 Kenton Groombridge gentoo-dev 2021-02-01 17:02:01 UTC
Created attachment 685449 [details]
emerge --info
Comment 2 Kenton Groombridge gentoo-dev 2021-02-01 17:02:38 UTC
Created attachment 685452 [details]
build.log
Comment 3 Ionen Wolkens gentoo-dev 2021-02-01 18:10:34 UTC
I can only reproduce with -stdlib=libc++, otherwise clang works fine.

gcc is fine on my end too, but I don't know what you've used with it.
Comment 4 Kenton Groombridge gentoo-dev 2021-02-01 18:19:23 UTC
(In reply to Ionen Wolkens from comment #3)
> I can only reproduce with -stdlib=libc++, otherwise clang works fine.
> 
> gcc is fine on my end too, but I don't know what you've used with it.

Looks like you're right. If libc++ support is out of scope I'm OK with closing this, but otherwise a fix for it would be nice. It's not a dealbreaker though, as I've got the necessary env vars to build it with libstdc++, and it runs fine anyways.
Comment 5 12101111 2021-02-07 06:17:58 UTC
Created attachment 685950 [details, diff]
fix building with libc++

The issue is caused by `using namespace std;`
Comment 6 Chiitoo gentoo-dev 2021-04-25 12:03:34 UTC
Hmmm, would

option(USE_LIBC++ "Use libc++ instead of libstdc++" ${APPLE})

if(USE_LIBC++)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")

be of any help with this?
Comment 7 Kenton Groombridge gentoo-dev 2021-05-26 16:05:18 UTC
(In reply to 12101111 from comment #5)
> Created attachment 685950 [details, diff] [details, diff]
> fix building with libc++
> 
> The issue is caused by `using namespace std;`

I can confirm this patch fixed the issue. Would it be appropriate to apply this patch conditionally in the ebuild, perhaps with a USE=libcxx?

(In reply to Chiitoo from comment #6)
> Hmmm, would
> 
> option(USE_LIBC++ "Use libc++ instead of libstdc++" ${APPLE})
> 
> if(USE_LIBC++)
>     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
> 
> be of any help with this?

I think if a USE=libcxx existed, this should be enabled by that flag.

All of this might be a little too much to ask. I've no idea if building with libc++ is officially supported in Gentoo or not, but I have it working on 4 different systems for the most part.
Comment 8 Kenton Groombridge gentoo-dev 2022-02-22 20:49:56 UTC
obs-studio 27.2.0 builds fine now, no user patch necessary. I've no problem closing this bug unless there's some other reason to keep it open.
Comment 9 Chiitoo gentoo-dev 2022-02-22 20:53:07 UTC
Heh, I was just about to close with the following comment.  :]

Looks like the fix got in on 27.2?

Let us know if there's still something for us to do here.

Thanks!