Hi,

I tried using the new gen-event-data.py file. This is the output:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/root/sources/firefox-52.4.1esr/python/mozbuild/mozbuild/action/file_generate.py", line 108, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/root/sources/firefox-52.4.1esr/python/mozbuild/mozbuild/action/file_generate.py", line 53, in main
    ('.py', 'r', imp.PY_SOURCE))
  File "/root/sources/firefox-52.4.1esr/toolkit/components/telemetry/gen-event-data.py", line 9, in <module>     from shared_telemetry_utils import StringTable, static_assert, ParserError
ImportError: cannot import name ParserError
make[5]: *** [backend.mk:9: TelemetryEventData.h] Error 1
make[5]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir/toolkit/components/telemetry' make[4]: *** [/root/sources/firefox-52.4.1esr/config/recurse.mk:79: toolkit/components/telemetry/export] Error 2 make[4]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir' make[3]: *** [/root/sources/firefox-52.4.1esr/config/recurse.mk:33: export] Error 2 make[3]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir' make[2]: *** [/root/sources/firefox-52.4.1esr/config/rules.mk:523: default] Error 2 make[2]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir' make[1]: *** [/root/sources/firefox-52.4.1esr/client.mk:415: realbuild] Error 2
make[1]: Leaving directory '/root/sources/firefox-52.4.1esr'
make: *** [client.mk:170: build] Error 2

Line 82 in the original gen-event-data.py was "e.dataset),".

Here are the contents of my mozconfig file:

# If you have a multicore machine, all cores will be used by default.
# If desired, you can reduce the number of cores used, e.g. to 1, by
# uncommenting the next line and setting a valid number of CPU cores.
#mk_add_options MOZ_MAKE_FLAGS="-j1"

# If you have installed dbus-glib, comment out this line:
#ac_add_options --disable-dbus

# If you have installed dbus-glib, and you have installed (or will install)
# wireless-tools, and you wish to use geolocation web services, comment out
# this line
#ac_add_options --disable-necko-wifi

# Uncomment this option if you wish to build with gtk+-2
#ac_add_options --enable-default-toolkit=cairo-gtk2

# Uncomment these lines if you have installed optional dependencies:
ac_add_options --enable-system-hunspell
ac_add_options --enable-startup-notification

# Comment out following option if you have PulseAudio installed
#ac_add_options --disable-pulseaudio

# If you have installed GConf, comment out this line
#ac_add_options --disable-gconf

ac_add_options --disable-jemalloc
ac_add_options --disable-rust
# Comment out following options if you have not installed
# recommended dependencies:
ac_add_options --enable-system-sqlite
ac_add_options --with-system-libevent
ac_add_options --with-system-libvpx
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-system-icu

# If you are going to apply the patch for system graphite
# and system harfbuzz, uncomment these lines:
#ac_add_options --with-system-graphite2
#ac_add_options --with-system-harfbuzz

# Stripping is now enabled by default.
# Uncomment these lines if you need to run a debugger:
#ac_add_options --disable-strip
#ac_add_options --disable-install-strip

# The BLFS editors recommend not changing anything below this line:
ac_add_options --prefix=/usr
ac_add_options --enable-application=browser

ac_add_options --disable-crashreporter
ac_add_options --disable-updater
ac_add_options --disable-tests

ac_add_options --enable-optimize="-O2"

ac_add_options --enable-gio
ac_add_options --enable-official-branding
ac_add_options --enable-safe-browsing
ac_add_options --enable-url-classifier

# From firefox-40, using system cairo causes firefox to crash
# frequently when it is doing background rendering in a tab.
#ac_add_options --enable-system-cairo
ac_add_options --enable-system-ffi
ac_add_options --enable-system-pixman

ac_add_options --with-pthreads

ac_add_options --with-system-bz2
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir

On Fri, Oct 27, 2017 at 01:23:25PM -0500,[email protected]  wrote:

Hi,

I'm trying compiling Firefox 52.4.1esr on my Linux from Scratch system. The 
computer is a dual-core Pentium III with 1GB of RAM.

If you get past this problem, you will need a*lot*  of swap space,
perhaps 4GB or more.  Right at the end of the build it does the
linking.

I wasn't able to compile the latest version of Firefox as it
required Rust. I already tried to compile Rust to work on the
Pentium III until I found out Firefox 53 and later won't run on
anything earlier than a Pentium 4.

I found different reports that firefox 48 or 49 dropped support for
machines without SSE2 instructions, including the pentium III.

Anyways, when I compile the ESR release I get the following error message after 
it compiles for a little bit:

props2arrays.py main unixcharset.properties.h .deps/unixcharset.properties.h.pp 
/root/sources/firefox-52.4.1esr/intl/locale/unix/unixcharset.properties
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File 
"/root/sources/firefox-52.4.1esr/python/mozbuild/mozbuild/action/file_generate.py", 
line 108, in <module>
sys.exit(main(sys.argv[1:]))
File 
"/root/sources/firefox-52.4.1esr/python/mozbuild/mozbuild/action/file_generate.py",
 line 63, in main
ret = module.__dict__[method](output, *args.additional_arguments)
File 
"/root/sources/firefox-52.4.1esr/toolkit/components/telemetry/gen-event-data.py",
 line 125, in main
write_common_event_table(events, output, string_table, extra_table)
File 
"/root/sources/firefox-52.4.1esr/toolkit/components/telemetry/gen-event-data.py",
 line 82, in write_common_event_table
e.dataset),
TypeError: %d format: a number is required, not float
make[5]: Leaving directory 
'/root/sources/firefox-52.4.1esr/firefox-build-dir/intl/locale/unix'
make[5]: *** [backend.mk:9: TelemetryEventData.h] Error 1
make[5]: *** Deleting file 'TelemetryEventData.h'
make[5]: Leaving directory 
'/root/sources/firefox-52.4.1esr/firefox-build-dir/toolkit/components/telemetry'
make[4]: *** [/root/sources/firefox-52.4.1esr/config/recurse.mk:79: 
toolkit/components/telemetry/export] Error 2
make[4]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir'
make[3]: *** [/root/sources/firefox-52.4.1esr/config/recurse.mk:33: export] 
Error 2
make[3]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir'
make[2]: *** [/root/sources/firefox-52.4.1esr/config/rules.mk:523: default] 
Error 2
make[2]: Leaving directory '/root/sources/firefox-52.4.1esr/firefox-build-dir'
make[1]: *** [/root/sources/firefox-52.4.1esr/client.mk:415: realbuild] Error 2
make[1]: Leaving directory '/root/sources/firefox-52.4.1esr'
make: *** [client.mk:170: build] Error 2

Google only found your posts about this.  I suspect this means that
current 52esr has become dependant on SSE2.

I already installed the rest of the dependencies for Firefox and installed 
OpenSSL 2.7.14 before Python 2.7.14. I'm using GCC 7.2.0 to compile the source 
and I used the -O2 flag. I also used the Firefox build configuration file from 
BLFS 8.0-systemd. The Linux from Scratch version is 20170924-systemd.

A solution would be much appreciated.

Thanks for your help,
Gunnersky2002.

I suspect there are no maintained graphical browsers which will work
for you.  Chromium apparently dropped support for non-SSE2 years
ago, qtwebengine uses chromium stuff (and anyway needs qt5, which is
dreadfully slow to build), whether Pale Moon counts as 'maintained'
(for vulnerability fixes) I do no know - but anyway it doesn't build
with recent versions of gcc.  Sorry.

ĸen
-- Truth, in front of her huge walk-in wardrobe, selected black leather boots with stiletto heels for such a barefaced truth. - Unseen Academicals ------------------------------ Message: 2 Date: Sat, 28 Oct 2017 11:05:34 -0400 From: Michael Shell <[email protected]> To: [email protected] Subject: Re: [blfs-support] TypeError: %d format: a number is required, not float when building Firefox 52.4.1esr Message-ID: <[email protected]> Content-Type: text/plain; charset=US-ASCII On Fri, 27 Oct 2017 13:23:25 -0500 [email protected] wrote:

File 
"/root/sources/firefox-52.4.1esr/toolkit/components/telemetry/gen-event-data.py",
 line 82, in write_common_event_table
e.dataset),
TypeError: %d format: a number is required, not float

Well, it looks like a ("simple") python issue to me and might not even
be related to older systems:

https://stackoverflow.com/questions/27030856/python-typeerror-d-format-a-number-is-required-not-nonetype
https://stackoverflow.com/questions/27324102/typeerror-d-format-a-number-is-required-not-getset-descriptor
https://stackoverflow.com/questions/34113421/pymysql-query-formatting-typeerror-d-format-a-number-is-required-not-str

It might be a good idea to ask some Python folks what is, or could be,
going wrong here. It also might be very helpful to insert some python
test code to print out all the affected field values to see what the
incorrectly passed value actually is.

But, given that I, like Ken, can't find any other example this particular
error on the net, it might be caused by a lack of RAM or SWAP problem.
It could also be triggered (only) by a very recent GCC. A hardware
problem is another possibility - most especially if the exact error
is not repeatable.


What does the Python code in gen-event-data.py", line 82, in
write_common_event_table look like? I think a (very similar,
newer version?) copy of it can be found online here:

https://github.com/mozilla/gecko-dev/blob/master/toolkit/components/telemetry/gen-event-data.py

From:

https://github.com/rg3/youtube-dl/issues/8299

note that this type of error happens when a nonnumerical option is
assigned a value that requires a number. e.g., --retries infinite
instead of --retries 100

Could anything like this be going on in your mozconfig or some
other typo in a setup/patch/config parameter?


On Fri, 27 Oct 2017 20:17:10 +0100
Ken Moffat<[email protected]>  wrote:

I suspect there are no maintained graphical browsers which will work
for you.

<rant>
IMHO, when buiding from source, non-SSE should always be an option even
if performance suffers as a result. Sometimes/often/always
requirements like this are simply the result of "lazy or indifferent"
developers rather the result of a real technical need.
</rant>

Anyway ...
I have some old notes on getting such things to work with older CPUs
that may be of help to someone. However, I have not tried any of this
with the most recent versions of packages, but I do suspect it will
still work.

For QT stuff, configure with the -no-sse2 option. For QtWebKit invoke
the --no-force-sse2 option.

Another, in my opinion better, option (given the enormous bloat of QT)
is WebkitGTK+ based browsers, especially Midori:

http://www.linuxfromscratch.org/blfs/view/svn/xsoft/midori.html

However, SSE instructions must be disable in WebkitGTK+. To do this,
apply the disable-jit-nonsse2.patch from debian:

https://packages.debian.org/source/sid/webkitgtk

found in webkitgtk_2.4.11-3.debian.tar.xz

http://http.debian.net/debian/pool/main/w/webkitgtk/webkitgtk_2.4.11-3.debian.tar.xz

*as well as*  invoking the --disable-jit configure option

The Debian fix-ftbfs-gcc6.patch and x32_support.patch might also be
helpful/needed.

Those who have an older Xorg system might have to disable some other
things as well:

../configure --prefix=/usr --with-gtk=2.0 --disable-webkit2
--disable-gamepad --disable-webgl --disable-geolocation
--disable-glx --disable-accelerated-compositing
--disable-jit


The following won't be a problem for Gunnersky2002 because he is using
gcc 7.2.0, but just for the record here, some older versions of gcc
(pre 5.x series), may error with:

  CXXLD    libwebkitgtk-1.0.la
./.libs/../DerivedSources/WebInspectorUI/.libs/libWebCore_la-GResourceBundle.o: 
In function `read':
GResourceBundle.c:(.text+0x0): multiple definition of `read'

which can be overcome by disabling -O2 and -D_FORTIFY_SOURCE=2
in CFLAGS - before running configure, edit .configure and
and change lines 21968-21982 from:

# Add the appropriate 'O' level for optimized builds.
if test "$enable_optimizations" = "yes"; then
    CXXFLAGS="$CXXFLAGS -O2"
    CFLAGS="$CFLAGS -O2"

    if test "$c_compiler" = "gcc"; then
        CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
    fi
    if test "$cxx_compiler" = "g++"; then
        CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
    fi
else
    CXXFLAGS="$CXXFLAGS -O0"
    CFLAGS="$CFLAGS -O0"
fi


to:


# Add the appropriate 'O' level for optimized builds.
if test "$enable_optimizations" = "yes"; then
    CXXFLAGS="$CXXFLAGS -O1"
    CFLAGS="$CFLAGS -O1"
else
    CXXFLAGS="$CXXFLAGS -O0"
    CFLAGS="$CFLAGS -O0"
fi

https://mail-index.netbsd.org/tech-pkg/2014/05/25/msg013114.html


Anyway, as Ken said, be sure you have at least 4GB of swap space lest
you encounter gcc errors such as "g++: internal compiler error".

In older machines of limited RAM, it might be helpful to provide
swap via a SSD drive, but I have not tested this so I don't know
what kind of performance increase can be expected from doing so.
Expect a WebkitGTK+ compilation time ranging from 12-48 hrs on
such old machines using a standard HD based swap.



  Cheers,

  Mike




------------------------------

Message: 3
Date: Sat, 28 Oct 2017 10:52:23 -0500
From: Bruce Dubbs<[email protected]>
To: BLFS Support List<[email protected]>
Subject: Re: [blfs-support] TypeError: %d format: a number is
        required, not float when building Firefox 52.4.1esr
Message-ID:<[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed

Michael Shell wrote:

Another, in my opinion better, option (given the enormous bloat of QT)
is WebkitGTK+ based browsers, ...

LOL.  You have to be kidding.


WebKitGTK+-2.18.1:
Estimated build time: 46 SBU (using parallelism=4, estimated 152 SBUs
using one core)

Qt-5.9.2:
Estimated build time: 27 SBU (using parallelism=4)

I admit that QtWebEngine is a monstrosity, but only qupzilla uses that.

   -- Bruce

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to