XCode builds install incorrectly

classic Classic list List threaded Threaded
26 messages Options
12
i
Reply | Threaded
Open this post in threaded view
|

XCode builds install incorrectly

i
Why are they putting things in /usr/local/SuperCollider? This is wrong for Mac.

Latest master, fresh build folder.

S.
_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
Building from cl does the same thing.

> On 12 May 2017, at 17:27, [hidden email] wrote:
>
> Why are they putting things in /usr/local/SuperCollider? This is wrong for Mac.
>
> Latest master, fresh build folder.
>
> S.
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

Rainer Schuetz

> On 12. May 2017, at 18:32, [hidden email] wrote:
>
> Building from cl does the same thing.
>> On 12 May 2017, at 17:27, [hidden email] wrote:
>>
>> Why are they putting things in /usr/local/SuperCollider? This is wrong for Mac.

I don't see this... What are your build commands?
Who are "they"? ;)
Best
.r.
_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

brianlheim
I am also not experiencing this, I think you'll have to share steps to reproduce please.

Regards,
Brian

On Fri, May 12, 2017 at 2:39 PM, <[hidden email]> wrote:

> On 12. May 2017, at 18:32, [hidden email] wrote:
>
> Building from cl does the same thing.
>> On 12 May 2017, at 17:27, [hidden email] wrote:
>>
>> Why are they putting things in /usr/local/SuperCollider? This is wrong for Mac.

I don't see this... What are your build commands?
Who are "they"? ;)
Best
.r.



--
_______________________________
Brian Heim
507-429-6468

B.M. '14 University of Texas at Austin
M.M. '16 Yale School of Music
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
Sure:

Pulled today from master.

Make new build folder. From there:

cmake -G Xcode -DCMAKE_PREFIX_PATH=`brew --prefix qt55`  ..

Then either open the Xcode project and build using the install target, or...

cmake --build . --target install --config RelWithDebInfo

S.

On 12 May 2017, at 19:55, <[hidden email]> <[hidden email]> wrote:

I am also not experiencing this, I think you'll have to share steps to reproduce please.

Regards,
Brian

On Fri, May 12, 2017 at 2:39 PM, <[hidden email]> wrote:

> On 12. May 2017, at 18:32, [hidden email] wrote:
>
> Building from cl does the same thing.
>> On 12 May 2017, at 17:27, [hidden email] wrote:
>>
>> Why are they putting things in /usr/local/SuperCollider? This is wrong for Mac.

I don't see this... What are your build commands?
Who are "they"? ;)
Best
.r.



--
_______________________________
Brian Heim
507-429-6468

B.M. '14 University of Texas at Austin
M.M. '16 Yale School of Music

Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

Rainer Schuetz

> On 12. May 2017, at 22:27, [hidden email] wrote:
>
> Sure:
>
> Pulled today from master.
>
> Make new build folder. From there:
>
> cmake -G Xcode -DCMAKE_PREFIX_PATH=`brew --prefix qt55`  ..
>
> Then either open the Xcode project and build using the install target, or...
>
> cmake --build . --target install --config RelWithDebInfo


Maybe you have uncommitted changes on master? Or you are not really on master? Default is to install to buildfolder/Install. If that doesn't happen, either cmake or your code are somehow messed up. /Usr/local/SuperCollider is actually the location cmake would install to, if the cmake default wasn't overridden on OSX. If everything fails maybe a new checkout/clone would help. And if you just need to get going quickly, try setting CMAKE_PREFIX_PATH (-DCMAKE_PREFIX_PATH=./Install).

Best
.r.
_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i

> On 12 May 2017, at 21:35, <[hidden email]> <[hidden email]> wrote:
>
>
>> On 12. May 2017, at 22:27, [hidden email] wrote:
>>
>> Sure:
>>
>> Pulled today from master.
>>
>> Make new build folder. From there:
>>
>> cmake -G Xcode -DCMAKE_PREFIX_PATH=`brew --prefix qt55`  ..
>>
>> Then either open the Xcode project and build using the install target, or...
>>
>> cmake --build . --target install --config RelWithDebInfo
>
>
> Maybe you have uncommitted changes on master?

Nope.

> Or you are not really on master?

Well, it’s in fact a branch just off master, but this happens with nothing else committed.

S.

> Default is to install to buildfolder/Install. If that doesn't happen, either cmake or your code are somehow messed up. /Usr/local/SuperCollider is actually the location cmake would install to, if the cmake default wasn't overridden on OSX. If everything fails maybe a new checkout/clone would help. And if you just need to get going quickly, try setting CMAKE_PREFIX_PATH (-DCMAKE_PREFIX_PATH=./Install).
>
> Best
> .r.
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

Rainer Schuetz

On 12. May 2017, at 22:53, [hidden email] wrote:

Well, it’s in fact a branch just off master, but this happens with nothing else committed.

Sorry, I have no idea, just workarounds... AI can say it doesn't happen for me, and I am pretty sure nothing changed on master that would influence the default install location on OSX. This is the code that controls the install location for OSX, in the top level CMakeLists.txt:

Line 102:

if(APPLE)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE STRING "Cmake install path")
endif()
elseif(UNIX)
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
endif()

If you have that, and haven't specified CMAKE_INSTALL_PREFIX on the command line, and it still goes to /usr/local, something very general is messed up. Either your repo or cmake, I'd guess. (or cmake for some reason thinks it's not Apple/OSX).

Regards!
.r.
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

brianlheim
Hmm, sorry that you're experiencing this. I agree with Rainer that it sounds like a toolchain/system problem. Apparently `if(APPLE)` is not a failsafe way to detect OS X (http://www.openguru.com/2009/04/cmake-detecting-platformoperating.html), despite the documentation.

Can you try running CMake on a test snippet to see if we can isolate that as the problem?

Add

```
if (APPLE)
  message(STATUS "System is APPLE")
elseif (UNIX)
  message(STATUS "System is UNIX")
endif()
```

to the top of the main CMakeLists.txt file, or make a new file somewhere else with just that in it, and see what the output is.

-Brian

On Fri, May 12, 2017 at 5:03 PM, <[hidden email]> wrote:

On 12. May 2017, at 22:53, [hidden email] wrote:

Well, it’s in fact a branch just off master, but this happens with nothing else committed.

Sorry, I have no idea, just workarounds... AI can say it doesn't happen for me, and I am pretty sure nothing changed on master that would influence the default install location on OSX. This is the code that controls the install location for OSX, in the top level CMakeLists.txt:

Line 102:

if(APPLE)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE STRING "Cmake install path")
endif()
elseif(UNIX)
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
endif()

If you have that, and haven't specified CMAKE_INSTALL_PREFIX on the command line, and it still goes to /usr/local, something very general is messed up. Either your repo or cmake, I'd guess. (or cmake for some reason thinks it's not Apple/OSX).

Regards!
.r.



--
_______________________________
Brian Heim
507-429-6468

B.M. '14 University of Texas at Austin
M.M. '16 Yale School of Music
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
Says "System is APPLE”

On 12 May 2017, at 22:45, [hidden email] wrote:

Hmm, sorry that you're experiencing this. I agree with Rainer that it sounds like a toolchain/system problem. Apparently `if(APPLE)` is not a failsafe way to detect OS X (http://www.openguru.com/2009/04/cmake-detecting-platformoperating.html), despite the documentation.

Can you try running CMake on a test snippet to see if we can isolate that as the problem?

Add

```
if (APPLE)
  message(STATUS "System is APPLE")
elseif (UNIX)
  message(STATUS "System is UNIX")
endif()
```

to the top of the main CMakeLists.txt file, or make a new file somewhere else with just that in it, and see what the output is.

-Brian

On Fri, May 12, 2017 at 5:03 PM, <[hidden email]> wrote:

On 12. May 2017, at 22:53, [hidden email] wrote:

Well, it’s in fact a branch just off master, but this happens with nothing else committed.

Sorry, I have no idea, just workarounds... AI can say it doesn't happen for me, and I am pretty sure nothing changed on master that would influence the default install location on OSX. This is the code that controls the install location for OSX, in the top level CMakeLists.txt:

Line 102:

if(APPLE)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE STRING "Cmake install path")
endif()
elseif(UNIX)
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
endif()

If you have that, and haven't specified CMAKE_INSTALL_PREFIX on the command line, and it still goes to /usr/local, something very general is messed up. Either your repo or cmake, I'd guess. (or cmake for some reason thinks it's not Apple/OSX).

Regards!
.r.



--
_______________________________
Brian Heim
507-429-6468

B.M. '14 University of Texas at Austin
M.M. '16 Yale School of Music

Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

brianlheim
Hmm.. could you post the contents of cmake_install.cmake and CMakeCache.txt from the build folder?

On Sat, May 13, 2017 at 8:55 AM, <[hidden email]> wrote:
Says "System is APPLE”

On 12 May 2017, at 22:45, [hidden email] wrote:

Hmm, sorry that you're experiencing this. I agree with Rainer that it sounds like a toolchain/system problem. Apparently `if(APPLE)` is not a failsafe way to detect OS X (http://www.openguru.com/2009/04/cmake-detecting-platformoperating.html), despite the documentation.

Can you try running CMake on a test snippet to see if we can isolate that as the problem?

Add

```
if (APPLE)
  message(STATUS "System is APPLE")
elseif (UNIX)
  message(STATUS "System is UNIX")
endif()
```

to the top of the main CMakeLists.txt file, or make a new file somewhere else with just that in it, and see what the output is.

-Brian

On Fri, May 12, 2017 at 5:03 PM, <[hidden email]> wrote:

On 12. May 2017, at 22:53, [hidden email] wrote:

Well, it’s in fact a branch just off master, but this happens with nothing else committed.

Sorry, I have no idea, just workarounds... AI can say it doesn't happen for me, and I am pretty sure nothing changed on master that would influence the default install location on OSX. This is the code that controls the install location for OSX, in the top level CMakeLists.txt:

Line 102:

if(APPLE)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE STRING "Cmake install path")
endif()
elseif(UNIX)
add_definitions(-DSC_DATA_DIR="${CMAKE_INSTALL_PREFIX}/share/SuperCollider")
endif()

If you have that, and haven't specified CMAKE_INSTALL_PREFIX on the command line, and it still goes to /usr/local, something very general is messed up. Either your repo or cmake, I'd guess. (or cmake for some reason thinks it's not Apple/OSX).

Regards!
.r.



--
_______________________________
Brian Heim
<a href="tel:(507)%20429-6468" value="+15074296468" target="_blank">507-429-6468

B.M. '14 University of Texas at Austin
M.M. '16 Yale School of Music


i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i

On 13 May 2017, at 14:41, <[hidden email]> <[hidden email]> wrote:

Hmm.. could you post the contents of cmake_install.cmake

https://pastebin.com/kRHsVdaC


Thanks,

S.

Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

Rainer Schuetz

On 13. May 2017, at 16:04, [hidden email] wrote:

and CMakeCache.txt 

https://pastebin.com/aCCLTR14



I see one weird thing: The cmake_install_prefix in CMakeCache.txt is actually not from the top level CMakeLists.txt (as I said), but from the one in editors/sc-ide/CMakeLists.txt. It should be like this:

if(APPLE)
    if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
        set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE PATH "Install path prefix" FORCE)
    endif()

The corresponding CMakeCache.txt entry reads (note the comment //install path prefix, which is from the code above):

//Install path prefix
CMAKE_INSTALL_PREFIX:PATH=/Users/rainer/Projects/supercollider/build_test/Install

In your CMakeCache.txt the corresponding *comment* reads:

//Install path prefix, prepended onto install directories.

And then the unwanted:

CMAKE_INSTALL_PREFIX:PATH=/usr/local

This makes me think the code in your editors/sc-ide/CMakeLists.txt (line 320) must be different from mine. Can you verify that? Strange though that `git status` wouldn't show that...

Best
.r.
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

brianlheim
Thank you!

The first thing I noticed is that you're not building in /Users, but out of hierarchy in /code. I just tried the same thing with a repo cloned to /code/supercollider and was able to reproduce your issue. I'm not sure why that's happening, but it's not surprising to me that a non-standard use of the OS filesystem hierarchy breaks something that makes decisions based on the OS filesystem hierarchy. Have you always done your development there?

I'll continue to investigate.

Brian

On Sat, May 13, 2017 at 10:31 AM, <[hidden email]> wrote:

On 13. May 2017, at 16:04, [hidden email] wrote:

and CMakeCache.txt 

https://pastebin.com/aCCLTR14



I see one weird thing: The cmake_install_prefix in CMakeCache.txt is actually not from the top level CMakeLists.txt (as I said), but from the one in editors/sc-ide/CMakeLists.txt. It should be like this:

if(APPLE)
    if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
        set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install" CACHE PATH "Install path prefix" FORCE)
    endif()

The corresponding CMakeCache.txt entry reads (note the comment //install path prefix, which is from the code above):

//Install path prefix
CMAKE_INSTALL_PREFIX:PATH=/Users/rainer/Projects/supercollider/build_test/Install

In your CMakeCache.txt the corresponding *comment* reads:

//Install path prefix, prepended onto install directories.

And then the unwanted:

CMAKE_INSTALL_PREFIX:PATH=/usr/local

This makes me think the code in your editors/sc-ide/CMakeLists.txt (line 320) must be different from mine. Can you verify that? Strange though that `git status` wouldn't show that...

Best
.r.



--
-brian

_______________________________
Brian Heim | computer musician & programmer
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

Rainer Schuetz
Yea, smells like a user rights issue then. I cannot even create a folder /code without sudo... wouldn't dare to guess what happens if you go out of your user folder. Maybe try to configure with sudo once just to see if it generates a different cmake_prefix_path?

Best
.r.


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

brianlheim
After some further experimentation, the only way I have found to reproduce this is:

- clone the repo
- cd supercollider & mkdir build & cd build
- generate makefiles (without initializing submodules, causing a fatal error)
- initialize & update submodules
- run the cmake generation step again (without deleting partial cmake output from the preceding steps)

If I initialize the submodules first, or delete the cmake output generated from the faulty first attempt, it works fine. I can recreate this in any directory, not just a directory out-of-hierarchy. So I think that is the solution in your case. Please let me know if that works!

-Brian

On Sat, May 13, 2017 at 11:07 AM, <[hidden email]> wrote:
Yea, smells like a user rights issue then. I cannot even create a folder /code without sudo... wouldn't dare to guess what happens if you go out of your user folder. Maybe try to configure with sudo once just to see if it generates a different cmake_prefix_path?

Best
.r.


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/



--
-brian

_______________________________
Brian Heim | computer musician & programmer
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

miguel.negrao-lists
In reply to this post by Rainer Schuetz
Hi

On 13-05-2017 16:07, [hidden email] wrote:
> Yea, smells like a user rights issue then. I cannot even create a
> folder /code without sudo...

ls -l -a /
drwxr-xr-x   1 root   root  270 Set  7  2016 .

/ is owned by root and write permissions for group (r-x) and others
(r-x) are disabled which for directories means that users other than
root can't add new items, including other directories (only the owner can).

wouldn't dare to guess what happens if
> you go out of your user folder.

I don't see why that would be an issue as long as permissions are
correctly set up... for instance other internal and external disks are
also not under "User" but under "Volumes".

Best,
Miguel


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
In reply to this post by brianlheim

On 13 May 2017, at 15:38, [hidden email] wrote:

The first thing I noticed is that you're not building in /Users, but out of hierarchy in /code. I just tried the same thing with a repo cloned to /code/supercollider and was able to reproduce your issue. I'm not sure why that's happening, but it's not surprising to me that a non-standard use of the OS filesystem hierarchy breaks something that makes decisions based on the OS filesystem hierarchy. Have you always done your development there?

Yes, I created the folder in 2008. I’m guessing this was before there was a standard to be non- from! :-)

S.
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
In reply to this post by miguel.negrao-lists
/code is owned by me. Again I think it predates Apples lockdown.

S.

> On 13 May 2017, at 16:24, [hidden email] wrote:
>
> Hi
>
> On 13-05-2017 16:07, [hidden email] wrote:
>> Yea, smells like a user rights issue then. I cannot even create a
>> folder /code without sudo...
>
> ls -l -a /
> drwxr-xr-x   1 root   root  270 Set  7  2016 .
>
> / is owned by root and write permissions for group (r-x) and others (r-x) are disabled which for directories means that users other than root can't add new items, including other directories (only the owner can).
>
> wouldn't dare to guess what happens if
>> you go out of your user folder.
>
> I don't see why that would be an issue as long as permissions are correctly set up... for instance other internal and external disks are also not under "User" but under "Volumes".
>
> Best,
> Miguel
>
>
> _______________________________________________
> sc-dev mailing list
>
> info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
> archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
> search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/


_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
i
Reply | Threaded
Open this post in threaded view
|

Re: XCode builds install incorrectly

i
In reply to this post by brianlheim

> On 13 May 2017, at 16:11, [hidden email] wrote:
>
> After some further experimentation, the only way I have found to reproduce this is:
>
> - clone the repo
> - cd supercollider & mkdir build & cd build
> - generate makefiles (without initializing submodules, causing a fatal error)
> - initialize & update submodules
> - run the cmake generation step again (without deleting partial cmake output from the preceding steps)
>
> If I initialize the submodules first, or delete the cmake output generated from the faulty first attempt, it works fine. I can recreate this in any directory, not just a directory out-of-hierarchy. So I think that is the solution in your case. Please let me know if that works!

Sure. Can you confirm precisely what I need to delete? (Don’t want to waste time by missing something.)

S.
_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: http://www.listarc.bham.ac.uk/marchives/sc-dev/
search: http://www.listarc.bham.ac.uk/lists/sc-dev/search/
12