Re: Using macports-libcxx to build a non-MacPorts cmake project

2021-05-06 Thread Ken Cunningham
I you show me exactly what you’re trying to build and where the WIP sits, I 
would be happy to take a look for you if you like.

Ken



> On May 6, 2021, at 8:08 AM, wowfunha...@gmail.com  
> wrote:
> 
> Thanks Ken! Those cause the build to fail in the same way as before—which I'm 
> going to take to mean I was doing it right all along, and Dolphin just isn't 
> going to be amenable to building this way. My shared_mutex-free build mostly 
> works anyway.
> 
> 
> On May 3, 2021, at 5:46 PM, Ken Cunningham  > wrote:
> 
>> what you did actually might have worked, I think, ideally… too bad it didn’t.
>> 
>> Can you do this perhaps?
>> 
>> export CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1” 
>> export LDFLAGS="-L/opt/local/lib/libcxx"
>> 
>> 
>> or maybe this: 
>> 
>> CXX=/path/to/clang-9.0 CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1” 
>>  LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source
>> 
>> 
>> or maybe:
>> 
>> CXX="/path/to/clang-9.0 -nostdinc++ -I/opt/local/include/libcxx/v1”  
>> LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source
>> 
>> I really need to finish that simple shell script that is supposed to set up 
>> the environment like MacPorts does for you, but I will probably never get 
>> around to that…
>> 
>> Ken
>> 
> 



Re: Using macports-libcxx to build a non-MacPorts cmake project

2021-05-06 Thread wowfunha...@gmail.com
Thanks Ken! Those cause the build to fail in the same way as before—which I'm 
going to take to mean I was doing it right all along, and Dolphin just isn't 
going to be amenable to building this way. My shared_mutex-free build mostly 
works anyway.


On May 3, 2021, at 5:46 PM, Ken Cunningham  
wrote:

> what you did actually might have worked, I think, ideally… too bad it didn’t.
> 
> Can you do this perhaps?
> 
> export CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1” 
> export LDFLAGS="-L/opt/local/lib/libcxx"
> 
> 
> or maybe this: 
> 
> CXX=/path/to/clang-9.0 CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1”  
> LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source
> 
> 
> or maybe:
> 
> CXX="/path/to/clang-9.0 -nostdinc++ -I/opt/local/include/libcxx/v1”  
> LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source
> 
> I really need to finish that simple shell script that is supposed to set up 
> the environment like MacPorts does for you, but I will probably never get 
> around to that…
> 
> Ken
> 



Re: Using macports-libcxx to build a non-MacPorts cmake project

2021-05-03 Thread Ken Cunningham
what you did actually might have worked, I think, ideally… too bad it didn’t.

Can you do this perhaps?

export CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1” 
export LDFLAGS="-L/opt/local/lib/libcxx"


or maybe this: 

CXX=/path/to/clang-9.0 CXXFLAGS="-nostdinc++ -I/opt/local/include/libcxx/v1”  
LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source


or maybe:

CXX="/path/to/clang-9.0 -nostdinc++ -I/opt/local/include/libcxx/v1”  
LDFLAGS="-L/opt/local/lib/libcxx” cmake ../path/to/source

I really need to finish that simple shell script that is supposed to set up the 
environment like MacPorts does for you, but I will probably never get around to 
that…

Ken



Using macports-libcxx to build a non-MacPorts cmake project

2021-05-03 Thread wowfunha...@gmail.com
Hello!

I spent the weekend building a copy of the Dolphin emulator that is compatible 
with OS X 10.9! It mostly works, thanks in no small part to MacPorts's 
excellent legacy-support and clang-11 ports. 
https://forums.dolphin-emu.org/Thread-unofficial-dolphin-built-for-an-older-version-of-macos-os-x-10-9-mavericks

However, I had to remove a couple uses of shared_mutex from Dolphin's code, 
which I think may be leading to some odd freezes when configuring controllers. 
It occurred to me that I might be able to revert those changes (and hopefully 
fix the freezes) by building Dolphin against macports-libcxx.

Dolphin uses cmake, so I added the following to cmakelists.txt:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc++")
include_directories(/opt/local/include/libcxx/v1)
link_directories(/opt/local/lib/libcxx)

But Dolphin can't seem to compile this way. I don't know a ton about how C and 
CMake work—am I doing this right?

(I'm also perfectly content to live with what I have—I'm delighted that I got 
Dolphin to work at all—but I wouldn't feel right unless I exhausted all 
possible avenues.)

Thank you!