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: CONFIRMED
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 0xC0ncord
Modified: 2021-05-26 16:05 UTC (History)
2 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, 0xC0ncord
Details
emerge --info (emerge-info.txt,8.06 KB, text/plain)
2021-02-01 17:02 UTC, 0xC0ncord
Details
build.log (build.log,322.36 KB, text/x-log)
2021-02-01 17:02 UTC, 0xC0ncord
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 0xC0ncord 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 0xC0ncord 2021-02-01 17:02:01 UTC
Created attachment 685449 [details]
emerge --info
Comment 2 0xC0ncord 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 0xC0ncord 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 0xC0ncord 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.