xulrunner build completes and then fails to package when doing make package because of error related apparently to symlinks

RESOLVED DUPLICATE of bug 933111

Status

RESOLVED DUPLICATE of bug 933111
5 years ago
a year ago

People

(Reporter: ideami, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36

Steps to reproduce:

1) My system is a Centos 6 64 bits

2) First i downloaded the source from here:
hg clone http://hg.mozilla.org/mozilla-central/ src
Then i set the variable $topsrcdir  to the folder where i put the source
Then i did cd src and inside src i did:
echo ". \$topsrcdir/xulrunner/config/mozconfig" > .mozconfig
to point the build to the configuration file for Xulrunner

Then inside $topsrcdir/xulrunner/config/mozconfig i added
# This file specifies the build flags for XULRunner. #  . 
ac_add_options --enable-application=xulrunner
mk_add_options MOZ_OBJDIR=@topsrcdir@/obj-xulrunnerfinished

3) Then i made the build
make -f client.mk build

4) The build completed sucessfully and as a result i got an output folder
called obj-xulrunnerfinished (as specified in the mozconfig)

i found the output build, its on 
result/dist/bin
its there, but it has symlinks on it, so i read "However, the build directory may contain symlinks into the build tree; you must run the installation/packaging step to produce a standalone build which can be shared or moved.

i have tried to go to root of the result and do make package
but i get this error

obj-xulrunnerfinished]# make package
make[1]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make export
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `export'.
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make compile
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `compile'.
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make libs
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make make-package-internal
make[3]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
OMNIJAR_NAME=omni.ja \
{installed-folder}/obj-xulrunnerfinished/_virtualenv/bin/python {installed-folder}/toolkit/mozapps/installer/packager.py -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DDLL_PREFIX=lib -DDLL_SUFFIX=.so -DBIN_SUFFIX= -DGRE_MILESTONE=28.0a1 -DGRE_BUILDID=20131113193941 -DMOZ_DEB_TIMESTAMP="Wed, 13 Nov 2013 21:34:22 +0100" -DMOZ_APP_NAME=xulrunner -Dinstalldir=/usr/local/lib/xulrunner-28.0a1 \
--format omni \
\
--ignore-errors \
\
\
--optimizejars \
\
../../dist ../../dist/xulrunner \

Traceback (most recent call last):
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 375, in <module>
main()
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 320, in main
sink.close(args.manifest is not None)
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 366, in close
self.packager.close()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 298, in close
self._queue.execute()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 217, in execute
function(*args)
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 219, in add_manifest
self._formatter.add_manifest(entry)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 241, in add_manifest
formatter, base, path = self._get_omnijar(entry.base)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 228, in _get_omnijar
return self.omnijars[base], base, mozpack.path.relpath(path, base)
File "{installed-folder}/python/mozbuild/mozpack/path.py", line 27, in relpath
rel = normsep(os.path.relpath(path, start))
File "{installed-folder}/obj-xulrunnerfinished/_virtualenv/lib/python2.7/posixpath.py", line 404, in relpath
raise ValueError("no path specified")
ValueError: no path specified
make[3]: *** [stage-package] Error 1
make[3]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[2]: *** [make-package] Error 2
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[1]: *** [default] Error 2
make[1]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make: *** [package] Error 2


so i went to line of file where error happens:
line 404 is this: if not path:
raise ValueError("no path specified")

within this segment below:


def _resolve_link(path):
"""Internal helper function. Takes a path and follows symlinks
until we either arrive at something that isn't a symlink, or
encounter a path we've seen before (meaning that there's a loop).
"""
paths_seen = set()
while islink(path):
if path in paths_seen:
# Already seen this path, so we must have a symlink loop
return None
paths_seen.add(path)
# Resolve where the link points to
resolved = os.readlink(path)
if not isabs(resolved):
dir = dirname(path)
path = normpath(join(dir, resolved))
else:
path = normpath(resolved)
return path

supports_unicode_filenames = (sys.platform == 'darwin')

def relpath(path, start=curdir):
"""Return a relative version of a path"""

if not path:
raise ValueError("no path specified")

start_list = [x for x in abspath(start).split(sep) if x]
path_list = [x for x in abspath(path).split(sep) if x]

# Work out how much of the filepath is shared by start and path.
i = len(commonprefix([start_list, path_list]))

rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return curdir
return join(*rel_list)


Actual results:

i found the output build, its on 
result/dist/bin
its there, but it has symlinks on it, so i read "However, the build directory may contain symlinks into the build tree; you must run the installation/packaging step to produce a standalone build which can be shared or moved.

i have tried to go to root of the result and do make package
but i get this error

obj-xulrunnerfinished]# make package
make[1]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make export
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `export'.
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make compile
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make[2]: Nothing to be done for `compile'.
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make libs
make[2]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
make make-package-internal
make[3]: Entering directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
Makefile:71: FULL_NSPR_CFLAGS=-I\${includedir}
OMNIJAR_NAME=omni.ja \
{installed-folder}/obj-xulrunnerfinished/_virtualenv/bin/python {installed-folder}/toolkit/mozapps/installer/packager.py -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DDLL_PREFIX=lib -DDLL_SUFFIX=.so -DBIN_SUFFIX= -DGRE_MILESTONE=28.0a1 -DGRE_BUILDID=20131113193941 -DMOZ_DEB_TIMESTAMP="Wed, 13 Nov 2013 21:34:22 +0100" -DMOZ_APP_NAME=xulrunner -Dinstalldir=/usr/local/lib/xulrunner-28.0a1 \
--format omni \
\
--ignore-errors \
\
\
--optimizejars \
\
../../dist ../../dist/xulrunner \

Traceback (most recent call last):
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 375, in <module>
main()
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 320, in main
sink.close(args.manifest is not None)
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 366, in close
self.packager.close()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 298, in close
self._queue.execute()
File "{installed-folder}/python/mozbuild/mozpack/packager/__init__.py", line 217, in execute
function(*args)
File "{installed-folder}/toolkit/mozapps/installer/packager.py", line 219, in add_manifest
self._formatter.add_manifest(entry)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 241, in add_manifest
formatter, base, path = self._get_omnijar(entry.base)
File "{installed-folder}/python/mozbuild/mozpack/packager/formats.py", line 228, in _get_omnijar
return self.omnijars[base], base, mozpack.path.relpath(path, base)
File "{installed-folder}/python/mozbuild/mozpack/path.py", line 27, in relpath
rel = normsep(os.path.relpath(path, start))
File "{installed-folder}/obj-xulrunnerfinished/_virtualenv/lib/python2.7/posixpath.py", line 404, in relpath
raise ValueError("no path specified")
ValueError: no path specified
make[3]: *** [stage-package] Error 1
make[3]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[2]: *** [make-package] Error 2
make[2]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make[1]: *** [default] Error 2
make[1]: Leaving directory `{installed-folder}/obj-xulrunnerfinished/xulrunner/installer'
make: *** [package] Error 2


so i went to line of file where error happens:
line 404 is this: if not path:
raise ValueError("no path specified")

within this segment below:


def _resolve_link(path):
"""Internal helper function. Takes a path and follows symlinks
until we either arrive at something that isn't a symlink, or
encounter a path we've seen before (meaning that there's a loop).
"""
paths_seen = set()
while islink(path):
if path in paths_seen:
# Already seen this path, so we must have a symlink loop
return None
paths_seen.add(path)
# Resolve where the link points to
resolved = os.readlink(path)
if not isabs(resolved):
dir = dirname(path)
path = normpath(join(dir, resolved))
else:
path = normpath(resolved)
return path

supports_unicode_filenames = (sys.platform == 'darwin')

def relpath(path, start=curdir):
"""Return a relative version of a path"""

if not path:
raise ValueError("no path specified")

start_list = [x for x in abspath(start).split(sep) if x]
path_list = [x for x in abspath(path).split(sep) if x]

# Work out how much of the filepath is shared by start and path.
i = len(commonprefix([start_list, path_list]))

rel_list = [pardir] * (len(start_list)-i) + path_list[i:]
if not rel_list:
return curdir
return join(*rel_list)


Expected results:

That the build was packaged and ready for deployment
(Reporter)

Updated

5 years ago
OS: Windows 7 → Linux
(Reporter)

Comment 1

5 years ago
what i can confirm is that the build worked, i can go to the result folder and run xulrunner from there, like this :

[root@ns236697 bin]# pwd
{install folder}obj-xulrunnerfinished/dist/bin
[root@ns236697 bin]# ./xulrunner
Mozilla XULRunner 28.0a1

Usage: xulrunner [OPTIONS]
       xulrunner APP-FILE [APP-OPTIONS...]

OPTIONS
      --app                  specify APP-FILE (optional)
  -h, --help                 show this message
  -v, --version              show version
  --gre-version              print the GRE version string on stdout
  --install-app <application> [<destination> [<directoryname>]]
                             Install a XUL application.

APP-FILE
  Application initialization file.

APP-OPTIONS
  Application specific options.



It just fails to package when i do
make package
on the result folder

Updated

4 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 933111

Updated

a year ago
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.