iriscouch / build-couchdb

Batteries-included CouchDB build system
227 stars 36 forks source link

rake aborted, RHEL 5.4 #23

Open rhowardiv opened 12 years ago

rhowardiv commented 12 years ago

rake.log: http://pastebin.com/d98nVw3u

The line that stands out to me is the first STDERR line at the group towards the bottom:

STDERR make[2]: execvp: ../../tests/autom4te: Permission denied

I'm running rake as root here. Hmm... could it be a problem with SELinux?

rhowardiv commented 12 years ago

I guess it's not SELinux actually, derp:

$ sudo /usr/sbin/sestatus
SELinux status:                 disabled
rhowardiv commented 12 years ago

I think I got around it by making autoconf-2.59 w/o rake:

$ cd dependencies/autoconf-2.59
$ sudo ./configure --prefix=/usr/local/build-couchdb/build --program-suffix=2.59
$ sudo make && sudo make install

... but now I'm seeing a similar error later in the process

STDERR make[2]: execvp: /tmp/tracemonkey_build20111207-5353-1a9cdxi/config/nsinstall: Permission denied

Trying to figure out how to get around this. current rake.log: http://richardhoward.net/rake.log

rhowardiv commented 12 years ago

Did the same thing for autoconf-2.13, since it's required to build spidermonkey:

$ cd dependencies/autoconf-2.13
$ sudo ./configure --prefix=/usr/local/build-couchdb/build --program-suffix=2.13
$ sudo make && sudo make install

Then built spidermonkey manually (according to https://developer.mozilla.org/En/SpiderMonkey/Build_Documentation but using our local autoconf2.13):

$ cd dependencies/js_src
$ sudo ../../build/bin/autoconf2.13
$ sudo ./configure --prefix=/usr/local/build-couchdb/build --without-x
$ sudo make && sudo make install

Then rake failed on ICU4C so attempting to build that manually now...

$ cd dependencies/icu4c-4_4
$ sudo ./configure --prefix=/usr/local/build-couchdb/build
$ sudo make && sudo make install
rhowardiv commented 12 years ago

OK, built curl manually:

$ cd dependencies/curl
$ sudo ../../build/bin/autoconf2.59
$ sudo ./buildconf
$ env LDFLAGS='-Xlinker -rpath=/usr/local/build-couchdb/build/lib -L/usr/local/build-couchdb/build/lib' CPPFLAGS='-I/usr/local/build-couchdb/build/include -I/usr/local/build-couchdb/build/include/js' sudo /usr/local/build-couchdb/dependencies/curl/configure --prefix='/usr/local/build-couchdb/build' --with-js-include='/usr/local/build-couchdb/build/include/js' --with-js-lib='/usr/local/build-couchdb/build/lib' --with-erlang=/usr/local/build-couchdb/build/lib/erlang/usr/include

Looks like I must now build couchdb manually:

$ sudo mkdir -p /usr/local/build-couchdb/build/var/run/couchdb
$ cd dependencies/couchdb
$ sudo ./bootstrap
$ env LDFLAGS='-Xlinker -rpath=/usr/local/build-couchdb/build/lib -L/usr/local/build-couchdb/build/lib' CPPFLAGS='-I/usr/local/build-couchdb/build/include -I/usr/local/build-couchdb/build/include/js' sudo /usr/local/build-couchdb/dependencies/couchdb/configure --prefix='/usr/local/build-couchdb/build' --with-js-include='/usr/local/build-couchdb/build/include/js' --with-js-lib='/usr/local/build-couchdb/build/lib' --with-erlang=/usr/local/build-couchdb/build/lib/erlang/usr/include

Okay, that failed with a message about a missing icu-config, I'll have to see if I built ICU4C correctly...

rhowardiv commented 12 years ago

Down to chewing gum and baling wire.

Rebuild icu4c using its runConfigureICU script. Still not sure I'm building that correctly.

Ended up hard-coding the paths to icu-config, curl-config, erl, erlc in the couchdb configure script.

Also added a newline to the end of a utf8.h file that hung the first make pass (?).

after make && make install, the icu4c lib still doesn't appear to be linked properly; running couchdb results in this error:

=CRASH REPORT==== 8-Dec-2011::10:02:08 ===
  crasher:
    initial call: application_master:init/4
    pid: <0.30.0>
    registered_name: []
    exception exit: {bad_return,
                        {{couch_app,start,
                             [normal,
                              ["/usr/local/build-couchdb/build/etc/couchdb/default.ini",
                               "/usr/local/build-couchdb/build/etc/couchdb/local.ini"]]},
                         {'EXIT',
                             "libicuuc.so.44: cannot open shared object file: No such file or directory"}}}
      in function  application_master:init/4
    ancestors: [<0.29.0>]
    messages: [{'EXIT',<0.31.0>,normal}]
    links: [<0.29.0>,<0.7.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1597
    stack_size: 24
    reductions: 141
  neighbours:

=INFO REPORT==== 8-Dec-2011::10:02:08 ===
    application: couch
    exited: {bad_return,{{couch_app,start,
                                    [normal,
                                     ["/usr/local/build-couchdb/build/etc/couchdb/default.ini",
                                      "/usr/local/build-couchdb/build/etc/couchdb/local.ini"]]},
                         {'EXIT',"libicuuc.so.44: cannot open shared object file: No such file or directory"}}}
    type: temporary

I guess that's about it for this approach, which was probably foolish anyhow. (I may try to rebuild icu4c again if I can figure out what I'm doing wrong there.)

Checked my versions of ruby and rake against a machine where build-couchdb worked. Both are at 1.8.5 and 0.8.7, respectively, so that's not the root problem; hmm...

jhs commented 12 years ago

Thanks for all the valuable feedback. I need to install a new VM, and I'm unsure if I have a RHEL release. It may have to be CentOS.

Based on your difficulties doing it manually, I am starting to think that it would be better to correct that first bug which derailed the build. It is likely that subsequent steps will work correctly and you'll get a nice build.

"Permission denied" can mean that the execution bits aren't set correctly, or also a noexec flag in the mount options, and I vaguely remember it can even come up if there are linker or some kind of error with the script language (sh, bash, etc.)--but I don't remember how that works anymore.

I have never tested building as root so you may want to try a fresh checkout and build as a standard user. (Unfortunately it still tries to run sudo which was a design mistake that I have not corrected yet.)

rhowardiv commented 12 years ago

Actually just doing a regular build from source was pretty painless, given that I'm accessing epel. Yum handled libicu-devel and js-devel, and latest curl (in this case to /usr/local) and erlang from source were straightforward. Only problem is that --enable-js-trunk was required to configure couchdb; I'm unsure of the precise ramifications of this; is it just that all our view functions will need to be named?

I'll try running build-couchdb as a standard user just in case that works...

rhowardiv commented 12 years ago

Trying build-couchdb as standard user did not result in any differences--got the same original "permission denied" error.

I'm inclined to close this issue since RHEL 5.4 is technically unsupported and just doing a regular build from source was straightforward.

I'll try to get clear on the exact consequences of --enable-js-trunk first, though.

jhs commented 12 years ago

Thanks for the update. Yes, Couch isn't that bad, and most of build-couchdb is just running the make, configure, etc. commands you would usually do.

When you say RHEL 5.4 is technically unsupported, do you mean by Red Hat, or by build-couchdb? Ideally, I want build-couchdb to support all major Linux releases which are still supported by their vendors. But we're not there yet of course.