Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc #4

Open
janl opened this issue Jan 20, 2013 · 13 comments
Open

misc #4

janl opened this issue Jan 20, 2013 · 13 comments

Comments

@janl
Copy link

janl commented Jan 20, 2013

Hi,

I tried following the instructions. Aside from a build-couchdb issue that I filed separately, I had to change a few things.

  1. xcodebuild expects the build folder to be in ../build-couchdb-1.2.1/build instead of ~/build
  2. xcodebuild then expects erl to be in ~/build/bin. I tried link -sing the above build directory to ~/build, I got the build to succeed, but now the Erlang system that is used to start the server is in ~/build/. Testing the.appon another Mac then fails of course, because~/build` doesn’t exist.

This seems to be missing a little fiddling with paths and whatnot, but looks otherwise fairly robust to make proper releases with in an automated way. I am happy to help if I can get a few pointers :)

@hjsch
Copy link
Member

hjsch commented Feb 13, 2013

Hi Jan,

After build-couchdb, erl is a link to ../erlang/bin/erl. But that version has absolute paths. The OSX version needs to be fully relocatable and that is why the couchdbx-app comes with an own relocatable version. It is in the supporting files groups. A build phase rule copies that version into the couchdbx-core/bin directory.
Screen Shot 2013-02-13 at 10 07 04 PM

@janl
Copy link
Author

janl commented Feb 13, 2013

I understand that that’s what’s supposed to happen in theory, but it doesn’t. I end up with a non-relocatable .app file

@hjsch
Copy link
Member

hjsch commented Feb 13, 2013

Hm, can you please check the make.log file if the rule is executed? It should look like:

PBXCp "Couchbase Server/erl" "build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/bin/erl"
cd /Users/hs/prj/couchdbx-app
builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -strip-debug-symbols -strip-tool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -resolve-src-symlinks "/Users/hs/prj/couchdbx-app/Couchbase Server/erl" "/Users/hs/prj/couchdbx-app/build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/bin"

@janl
Copy link
Author

janl commented Feb 14, 2013

It looks like the rule you mention does get executed.

But that doesn’t address the fact that the build directory is required in two locations, I’ll try to debug this some more.

@janl
Copy link
Author

janl commented Feb 14, 2013

Yeah, there is definitely an oddity here:

> xcodebuild
[...]

** BUILD FAILED **


The following build commands failed:
    PBXCp ../build-couchdb-1.2.1/build/bin "build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/bin"
    PBXCp ../build-couchdb-1.2.1/build/etc "build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/etc"
    PBXCp ../build-couchdb-1.2.1/build/env.sh "build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/env.sh"
    PBXCp ../build-couchdb-1.2.1/build/lib "build/Release/Apache CouchDB.app/Contents/Resources/couchdbx-core/lib"
(4 failures)

Why would it look in ../build-couchdb-1.2.1/build instead of ~/build as it says in the README?

When I copy/symlink ~/build to ../build-couchdb-1.2.1/build then I get xcodebuild to pass, but then it expects erl to be in ~/build

@janl
Copy link
Author

janl commented Feb 14, 2013

fixed this in janl@3110ca4

building this on 10.7 runs on 10.7 and 10.8.

@janl
Copy link
Author

janl commented Feb 14, 2013

Here is a link to the resulting binary/zip:

http://people.apache.org/~jan/Apache-CouchDB-1.2.1.zip

It still fails to be portable:

[15:48:58] jan____: /couchdbx-core/bin/couchdb: line 263: /Users/jan/build/bin/erl: No such file or directory on 10.8

@janl
Copy link
Author

janl commented Feb 14, 2013

It looks like fix-paths.sh “absolutizes” bin/couchdb which puts in full paths for the machine this is built on. Absolutizing doesn’t seem to make sense if we try to build a relocatable file.

@janl
Copy link
Author

janl commented Feb 14, 2013

These two made things work:

janl@3110ca4
janl@36dffe6

@janl
Copy link
Author

janl commented Feb 14, 2013

Latest binary up http://people.apache.org/%7Ejan/Apache-CouchDB-1.2.1.zip (same url)

@ryanramage
Copy link

+1 works for me. Tested relocating as well. osx 10.6.8

On Thu, Feb 14, 2013 at 10:26 AM, Jan Lehnardt [email protected]:

Latest binary up http://people.apache.org/%7Ejan/Apache-CouchDB-1.2.1.zip(same url)


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-13567425.

@janl
Copy link
Author

janl commented Feb 14, 2013

I didn't even expect that, that is awesome, thanks Ryan!

On 14.02.2013, at 18:43, Ryan Ramage [email protected] wrote:

+1 works for me. Tested relocating as well. osx 10.6.8

On Thu, Feb 14, 2013 at 10:26 AM, Jan Lehnardt [email protected]:

Latest binary up http://people.apache.org/%7Ejan/Apache-CouchDB-1.2.1.zip(same url)


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-13567425.


Reply to this email directly or view it on GitHub.

@dvbportal
Copy link
Member

Great job. +1 on 10.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants