Bug 237886 - devel/llvm: Add libc++ to LLVM ports or revive devel/libc++
Summary: devel/llvm: Add libc++ to LLVM ports or revive devel/libc++
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Brooks Davis
URL:
Keywords: feature, needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2019-05-13 18:46 UTC by Piotr Kubaj
Modified: 2019-06-11 18:18 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (brooks)
koobs: maintainer-feedback? (dim)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-05-13 18:46:22 UTC
I'm creating this PR to discuss adding libc++ to LLVM ports.

The problem:
root@talos:$~$ cat test.cpp; clang++80 test.cpp; uname -a
#include<iostream>
#include<string>

using namespace std;

int main(){
        string greeting("Hello world!");
        cout << greeting << endl;
        return 0;
}
test.cpp:1:9: fatal error: 'iostream' file not found
#include<iostream>
        ^~~~~~~~~~
1 error generated.
FreeBSD talos.anongoth.pl 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 #5 r343843M: Wed Feb  6 21:25:38 CET 2019     toor@talos.anongoth.pl:/usr/obj/usr/src/powerpc.powerpc64/sys/GENERIC64  powerpc

As you can see, libc++ is currently unavailable on e.g. powerpc64 (and other GCC architectures). libc++ is present neither in base nor in LLVM ports.

There's also no separate libc++ port (there used to be). Would it be possible to either:
a) add libc++ port, on which LLVM ports would depend on (at least on GCC architectures), or
b) include libc++ in LLVM ports (at least on GCC architectures)
?
Comment 1 Piotr Kubaj freebsd_committer 2019-05-13 18:46:47 UTC
This issue blocks many ports (including Firefox).
Comment 2 Dimitry Andric freebsd_committer 2019-05-14 06:01:48 UTC
While I'm not against this, I seem to remember some objections in the past. Can somebody dig up the older PRs for ports-based libc++?
Comment 3 Dimitry Andric freebsd_committer 2019-05-15 11:11:32 UTC
Baptiste and Bryan will probably have some ideas about this too :)
Comment 4 Brooks Davis freebsd_committer 2019-05-15 17:20:12 UTC
I remain concerned that if we start providing libc++.so with devel/llvm* that we'll end up with the cross threaded linkage hell we've historically had with gcc ports.  I think we're less likely to run into issues with a devel/libc++, but even there we'll likely see issues with unrecorded dependencies.  Someone should implement/resurrect a devel/libc++ and see if the result is actually usable.
Comment 5 Piotr Kubaj freebsd_committer 2019-06-11 18:18:43 UTC
Closing.