Failed to build from source

82 views
Skip to first unread message

wangjian

unread,
Apr 19, 2016, 5:16:54 AM4/19/16
to dactyl (grp)
I just cloned from https://github.com/5digits/dactyl.git and ran make but it failed:

% make -C pentadactyl xpi
make: Entering directory '/root/data/dactyl.git/pentadactyl'
Packaging chrome...
/root/data/dactyl.git/pentadactyl/../common/make_jar.sh: 67: /root/data/dactyl.git/pentadactyl/../common/make_jar.sh: cannot create /root/data/dactyl.git/pentadactyl/chrome//pentadactyl/config.json: Directory nonexistent
modified: config.json
diff: /root/data/dactyl.git/pentadactyl/chrome//pentadactyl/config.json: No such file or directory
/root/data/dactyl.git/pentadactyl/../common/make_jar.sh: 67: /root/data/dactyl.git/pentadactyl/../common/make_jar.sh: cannot create /root/data/dactyl.git/pentadactyl/chrome//common/config.json: Directory nonexistent
modified: config.json
diff: /root/data/dactyl.git/pentadactyl/chrome//common/config.json: No such file or directory
/root/data/dactyl.git/pentadactyl/../common/make_jar.sh: 119: cd: can't cd to /root/data/dactyl.git/pentadactyl/chrome/
SUCCESS: chrome/
Building XPI...
  adding: AUTHORS (deflated 42%)
  adding: Donors (deflated 44%)
  adding: LICENSE.txt (deflated 41%)
  adding: NEWS (deflated 64%)
  adding: TODO (deflated 44%)
  adding: bootstrap.js (deflated 70%)
  adding: chrome.manifest (deflated 8%)
  adding: components/ (stored 0%)
  adding: components/commandline-handler.js (deflated 60%)
  adding: config.json (deflated 70%)
  adding: icon.png (stored 0%)
  adding: icon64.png (stored 0%)
  adding: install.rdf (deflated 59%)
rm: cannot remove ‘chrome/’: No such file or directory
../common/Makefile:156: recipe for target 'xpi' failed
make: *** [xpi] Error 1
make: Leaving directory '/root/data/dactyl.git/pentadactyl'
%

I'm not familiar with compiling Firefox extensions so anything I need to prepare before running make?

Thanks.

-clark

wsha...@gmail.com

unread,
Apr 20, 2016, 7:30:27 AM4/20/16
to Pentadactyl, wangji...@gmail.com
The Makefile is unique to dactyl and not used by any other Firefox extension. Firefox extensions are just zip files following a certain directory structure. The Pentadactyl Makefile is complicated because it stores extension content strewn about the different directories that it then has to combine into one zip. You can look at the contents of the top level Makefile, the Makefiles in pentadactyl/ and common/, and the common/make_jar.sh files to see the commands that it is using. It works for me on recent distributions of Linux. There could be issues on systems with unusual shells or non-Linux utilties (like BSD or OS X) because sometimes commands with the same names have slightly different behavior. If you just want the xpi of the most recent code, it is available at https://github.com/ffledgling/dactyl-build/releases or https://github.com/willsALMANJ/pentadactyl-signed/releases. I am not sure about your specific error. You could try adding some print statements to the common/make_jar.sh script to try to figure out what is going on. It looks like the chrome directory is not being created. It should be created on line 18.

wangjian

unread,
Apr 20, 2016, 10:52:04 PM4/20/16
to wsha...@gmail.com, Pentadactyl
On Wed, Apr 20, 2016 at 7:30 PM, <wsha...@gmail.com> wrote:
The Makefile is unique to dactyl and not used by any other Firefox extension. Firefox extensions are just zip files following a certain directory structure. The Pentadactyl Makefile is complicated because it stores extension content strewn about the different directories that it then has to combine into one zip. You can look at the contents of the top level Makefile, the Makefiles in pentadactyl/ and common/, and the common/make_jar.sh files to see the commands that it is using. It works for me on recent distributions of Linux. There could be issues on systems with unusual shells or non-Linux utilties (like BSD or OS X) because sometimes commands with the same names have slightly different behavior. If you just want the xpi of the most recent code, it is available at https://github.com/ffledgling/dactyl-build/releases or https://github.com/willsALMANJ/pentadactyl-signed/releases. I am not sure about your specific error. You could try adding some print statements to the common/make_jar.sh script to try to figure out what is going on. It looks like the chrome directory is not being created. It should be created on line 18.

Found the problem. I have a hg (mercurial) repo in the root ( / ) dir so "hg root" would always succeed. The workaround is "make -C pentadactyl xpi HG=false". :)

 26 if test -n "$fromrepo" && $HG root >/dev/null 2>&1
 27 then
 28     root="$($HG root)"
 29     which cygpath >/dev/null 2>&1 && root=$(cygpath $root)
 30
 31     mf="$($HG --config ui.debug=false --config ui.verbose=false manifest)"
 32     find=$(which find)
 33     find() {
 34         echo "$mf" | sed -n "s!$(pwd | sed "s!$root/?!!")/?!!p" |
 35             grep "^$1"
 36         exit 1
 37     }
 38 fi

Reply all
Reply to author
Forward
0 new messages