iriscouch / build-couchdb

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

build couchdb-1.3.0 fails with python-2.6, passes with python-2.7 ... #81

Open breathe opened 11 years ago

breathe commented 11 years ago

The build fails with python-2.6 on rhel6.3.

git checkout HEAD .
rm -rf autom4te.cache
/home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoconf2.69 => /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoconf
/home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoreconf2.69 => /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoreconf
/home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoheader2.69 => /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoheader
/home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autom4te2.69 => /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autom4te
Attempting to backport macro.py to old Python. Wish me luck.
echo '/subprocess.check_output\ns/check_output/Popen/\ns/)$/, stdout=subprocess.PIPE).communicate()[0]/\nwq' | ed 'macro.py'
4383
?
git reset --hard
HEAD is now at e6d6aa7 README, NEWS: updated for release
git clean -f -d
git ls-files --others -i --exclude-standard | xargs rm -f || true
rm_f /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoconf
rm_f /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoreconf
rm_f /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autoheader
rm_f /home/ncohen/build-dryit/rhel6/build/build-couchdb/build/bin/autom4te
rake aborted!
Command failed with status (1): [echo '/subprocess.check_output\ns/check_ou...]

(See full trace by running task with --trace)

The build works with python 2.7 ...

afshin2003 commented 11 years ago

same problem here! I appreciate if it could be resolved :)

mhrdev commented 11 years ago

I think the problem occurs when echo command is not interpreting backslash escapes (could be bash version/setting issue). Adding -e to echo command in tasks/lib.rb solved the problem for me:

diff --git a/tasks/lib.rb b/tasks/lib.rb
index 51f5287..e7ab490 100644
--- a/tasks/lib.rb
+++ b/tasks/lib.rb
@@ -260,7 +260,7 @@ def ed(filename, *cmds)

   cmds << "wq"
   cmds = cmds.join "\\n"
-  sh "echo '#{cmds}' | ed '#{filename}'"
+  sh "echo -e '#{cmds}' | ed '#{filename}'"
 end

 def with_autoconf ver
forforf commented 11 years ago

Same error, mhrdev's fix worked for me. Centos (specifically Amazon's default EC2 AMI).

joscas commented 11 years ago

Same error and same fix also for me on AWS Linux instance

pfiled commented 11 years ago

+1 for mhrdev's fix, CentOS 6.4.

dalgibbard commented 10 years ago

Another +1 for mhrdev's fix! CentOS6.4 x86_64 with default Python2.6; I also needed to install ed and texinfo which I didn't see listed as a dep on the homepage :(