[opensource-dev] Building viewer-release on OS X.

2013-10-04 Thread Ash Qin
Hi there,

I am no novice to building the viewer on various platforms, but
currently I am building the viewer on OS X (first time setting this up
on OS X too) and have ran into a problem that I am having difficulty
working out what the cause is. I am currently using LLVM-GCC-4.2 from
xcode 4.6.2 on OS 10.8.5.

Google hasn't been helpful in this regard either. Hopefully someone
can give me some idea as to what the problem might be. I am currently
building the viewer-release using:

autobuild build -c ReleaseOS -- -DLL_TESTS:BOOL=NO
-DENABLE_SIGNING:BOOL=FALSE -DRELEASE_CRASH_REPORTING:BOOL=FALSE
-DNON_RELEASE_CRASH_REPORTING:BOOL=FALSE

This usually gives me a basic build to ensure I have the basics down
before I add anything like Kakadu or fmod to the mix. Unfortunately, I
seem to be getting this obscure cmake error when I build:

=== BUILD AGGREGATE TARGET ZERO_CHECK OF PROJECT SecondLife WITH
CONFIGURATION Release ===
Check dependencies

PhaseScriptExecution "CMake Rules"
/Users/ashweststar/Source/viewer-release/build-darwin-i386/SecondLife.build/Release/ZERO_CHECK.build/Script-09EB84842EB64FD49F26A2EE.sh
cd /Users/ashweststar/Source/viewer-release/indra
/bin/sh -c 
/Users/ashweststar/Source/viewer-release/build-darwin-i386/SecondLife.build/Release/ZERO_CHECK.build/Script-09EB84842EB64FD49F26A2EE.sh
echo ""

make -f 
/Users/ashweststar/Source/viewer-release/build-darwin-i386/CMakeScripts/ReRunCMake.make
make[1]: *** No rule to make target
`/Users/ashweststar/Source/viewer-release/build-darwin-i386/CMakeFiles/2.8.11.2/CMakeCCompiler.cmake',
needed by 
`/Users/ashweststar/Source/viewer-release/build-darwin-i386/CMakeFiles/cmake.check_cache'.
 Stop.
make: *** 
[/Users/ashweststar/Source/viewer-release/build-darwin-i386/CMakeFiles/ZERO_CHECK]
Error 2
Command /bin/sh failed with exit code 2


** BUILD FAILED **

A full copy of my build log is available at:

https://dl.dropboxusercontent.com/u/58565/log2.txt

I was hoping someone might have more insight as to why this is happening.

Thanks,
   Ash Qin
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Building viewer-release on OS X.

2013-10-04 Thread Ash Qin
> Did you install Command Line Tools with Xcode and CMake?

Yes.

> (from your logs)
> -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown

That's only because I defined the CC and CXX environment variables to
use LLVM-GCC through ccache using:

export CXX=/usr/local/opt/ccache/libexec/llvm-g++-4.2
export CC=/usr/local/opt/ccache/libexec/llvm-gcc-4.2

This is because I am aware that viewer-release will not build under
Clang. If you look in the build log, it uses those compilers fine.
Also, no difference when not using ccache.

> That's not good. :O

I don't know why it states unknown.

Ash
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Building viewer-release on OS X.

2013-10-04 Thread Ash Qin
> Shouldn't need an environment variable. Xcodebuild is directed to use the 
> system's llvm-gcc

I had tried already without ccache (and a clean build directory). What
I hadn't tried though was not defining CXX and CC variables to LLVM.

Surprisingly, I am able to compile the viewer now despite the
deceptive message that autobuild is now using Clang. The confusing
thing is that I can point the CXX and CC variables to the exact same
compilers xcode is using and still get the exact same failure.

This sort of behaviour leaves me a little miffed. Being that I would
really like to use ccache in my work, would you happen to know of a
way to tell xcode to use ccache + llvm in Second life's compilation
process?

> (just won't work on Xcode5, which you aren't using anyway, because Apple 
> symlinked "llvm-gcc" to clang. -_-)

So, one could get xcode5 working by just changing the symlink to the
right compiler?

Thanks,
   Ash

On Fri, Oct 4, 2013 at 3:55 PM, Cinder Biscuits
 wrote:
> On 4 Oct 2013, at 8:32, Ash Qin wrote:
>
>>> Did you install Command Line Tools with Xcode and CMake?
>>
>> Yes.
>>
>>> (from your logs)
>>> -- The C compiler identification is unknown
>>> -- The CXX compiler identification is unknown
>>
>> That's only because I defined the CC and CXX environment variables to
>> use LLVM-GCC through ccache using:
>>
>> export CXX=/usr/local/opt/ccache/libexec/llvm-g++-4.2
>> export CC=/usr/local/opt/ccache/libexec/llvm-gcc-4.2
>>
>> This is because I am aware that viewer-release will not build under
>> Clang. If you look in the build log, it uses those compilers fine.
>> Also, no difference when not using ccache.
>
> Shouldn't need an environment variable. Xcodebuild is directed to use
> the system's llvm-gcc
> in Variables.cmake (just won't work on Xcode5, which you aren't using
> anyway, because Apple
> symlinked "llvm-gcc" to clang. -_-)
>
> Seems to me that CMake is confused as to where the C compiler is. You've
> probably already tried
> this, but nuke build-darwin-i386 and try again without ccache.
> Something's likely stale.
>
> --
> Cinder
> ___
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/OpenSource-Dev
> Please read the policies before posting to keep unmoderated posting privileges
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges


Re: [opensource-dev] Building viewer-release on OS X.

2013-10-04 Thread Ash Qin
Just an update if anyone else is interested in using ccache on OS X.

Replacing the symlinks used for compilers in
/Applications/Xcode.app/Contents/Developer/usr/bin/ to the ccache
binary was sufficient to use ccache.

I will say that I am not very big on the whole replacing of system
files instead of using UNIX standard local paths for custom stuff, so
if you are aware of alternate ways of doing this with local paths or
environment variables, I'd appreciate hearing them.

Ash


On Fri, Oct 4, 2013 at 4:45 PM, Ash Qin  wrote:
>> Shouldn't need an environment variable. Xcodebuild is directed to use the 
>> system's llvm-gcc
>
> I had tried already without ccache (and a clean build directory). What
> I hadn't tried though was not defining CXX and CC variables to LLVM.
>
> Surprisingly, I am able to compile the viewer now despite the
> deceptive message that autobuild is now using Clang. The confusing
> thing is that I can point the CXX and CC variables to the exact same
> compilers xcode is using and still get the exact same failure.
>
> This sort of behaviour leaves me a little miffed. Being that I would
> really like to use ccache in my work, would you happen to know of a
> way to tell xcode to use ccache + llvm in Second life's compilation
> process?
>
>> (just won't work on Xcode5, which you aren't using anyway, because Apple 
>> symlinked "llvm-gcc" to clang. -_-)
>
> So, one could get xcode5 working by just changing the symlink to the
> right compiler?
>
> Thanks,
>Ash
>
> On Fri, Oct 4, 2013 at 3:55 PM, Cinder Biscuits
>  wrote:
>> On 4 Oct 2013, at 8:32, Ash Qin wrote:
>>
>>>> Did you install Command Line Tools with Xcode and CMake?
>>>
>>> Yes.
>>>
>>>> (from your logs)
>>>> -- The C compiler identification is unknown
>>>> -- The CXX compiler identification is unknown
>>>
>>> That's only because I defined the CC and CXX environment variables to
>>> use LLVM-GCC through ccache using:
>>>
>>> export CXX=/usr/local/opt/ccache/libexec/llvm-g++-4.2
>>> export CC=/usr/local/opt/ccache/libexec/llvm-gcc-4.2
>>>
>>> This is because I am aware that viewer-release will not build under
>>> Clang. If you look in the build log, it uses those compilers fine.
>>> Also, no difference when not using ccache.
>>
>> Shouldn't need an environment variable. Xcodebuild is directed to use
>> the system's llvm-gcc
>> in Variables.cmake (just won't work on Xcode5, which you aren't using
>> anyway, because Apple
>> symlinked "llvm-gcc" to clang. -_-)
>>
>> Seems to me that CMake is confused as to where the C compiler is. You've
>> probably already tried
>> this, but nuke build-darwin-i386 and try again without ccache.
>> Something's likely stale.
>>
>> --
>> Cinder
>> ___
>> Policies and (un)subscribe information available here:
>> http://wiki.secondlife.com/wiki/OpenSource-Dev
>> Please read the policies before posting to keep unmoderated posting 
>> privileges
___
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges