palemoon.pdf ? Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

palemoon.pdf ?

Unread post by Lunokhod » 2018-08-14, 02:19

Using Pale Moon 28.0.0b5 I just tried doing print to file which successfully "printed" a pdf. A neat way to test out what would be printed or save some piece of web content. However a very minor criticism is that the default file name is mozilla.pdf which looks like a bit of left over bit of branding that has been forgotten.
Wait, it's all Ohio? Always has been...

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: palemoon.pdf ?

Unread post by Moonchild » 2018-08-14, 04:42

We are still based on Mozilla code, which lies at the root of our platform toolkit code.
If content doesn't specify a file name, it will have to choose something, so mozilla.pdf is as good as any name, there.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2855
Joined: 2012-06-28, 01:20

Re: palemoon.pdf ?

Unread post by ron_1 » 2018-08-14, 22:48

I'm using PM 27.9.4 and when I print to pdf I get "goanna.pdf"

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-15, 13:57

I found these lines:
widget/gtk/nsDeviceContextSpecG.cpp
418: filename = nsPrintfCString("%s/mozilla.pdf", path);
420: filename.AssignLiteral("mozilla.pdf");

So I changed them to palemoon.pdf and, inspired by miroR, am now building Pale Moon 28 from a git clone, which is progressing.

I resolved some issues with incorrect info on the wiki:
https://developer.palemoon.org/Develope ... Moon/Linux
First the Arch build deps are a bit outdated and incomplete:
pacman -Syu gtk2 dbus-glib desktop-file-utils libxt mime-types \
alsa-lib startup-notification python2 autoconf2.13 unzip zip yasm \
libpulse gcc5

Optional:
pacman -Syu libpulse hunspell hyphen ffmpeg

I had:
gtk2 dbus-glib desktop-file-utils libxt alsa-lib startup-notification python2 unzip libpulse hunspell ffmpeg hyphen

I didn't have:
mime-types (now provided by mailcap) autoconf2.13 zip yasm gcc5

sudo pacman -S mailcap autoconf2.13 zip yasm gcc54

Build errors:
mozbuild.configure.options.InvalidOptionError: Unknown option: --disable-installer
Comment out this:
#ac_add_options --disable-installer

Next...
ERROR: Must export JS symbols when building a shared library.
add this:
ac_add_options --enable-export-js

Next...
0:12.12 DEBUG: configure: error: * * * Could not find gconf-2.0
$ sudo pacman -S gconf
Packages (1) gconf-3.2.6+11+g07808097-3

Code: Select all

83:29.41     INPUT("../../config/external/icu/common/uvector.o")
83:29.41     INPUT("../../config/external/icu/common/uvectr32.o")
83:29.41     INPUT("../../config/external/icu/common/uvectr64.o")
83:29.41
83:29.41 /usr/bin/ld: ../../config/external/icu/common/udata.o: in function `openCommonData(char const*, int, UErrorCode*) [clone .part.10]':
83:29.41 /home/me/projects/palemoon-UXP/1TESTUXP/intl/icu/source/common/udata.cpp:677: undefined reference to `icudt58_dat'
83:29.41 /usr/bin/ld: ../../config/external/icu/common/udata.o: relocation R_X86_64_PC32 against undefined hidden symbol `icudt58_dat' can not be used when making a
shared object

83:29.41 /usr/bin/ld: final link failed: bad value
83:29.41 collect2: error: ld returned 1 exit status
83:29.41 make[5]: *** [/home/me/projects/palemoon-UXP/1TESTUXP/config/rules.mk:782: libmozjs.so] Error 1
83:29.41 make[4]: *** [/home/me/projects/palemoon-UXP/1TESTUXP/config/recurse.mk:71: js/src/target] Error 2
83:29.41 make[3]: *** [/home/me/projects/palemoon-UXP/1TESTUXP/config/recurse.mk:33: compile] Error 2
83:29.41 make[2]: *** [/home/me/projects/palemoon-UXP/1TESTUXP/config/rules.mk:503: default] Error 2
83:29.41 make[1]: *** [/home/me/projects/palemoon-UXP/1TESTUXP/client.mk:414: realbuild] Error 2
83:29.41 make: *** [client.mk:170: build] Error 2
83:29.44 648 compiler warnings present.
83:29.66 Notification center failed: Install the python dbus module to get a notification when the build finishes.
So I'm researching the location of icudt58_dat. It may be related to this lib, I have one version installed but it might not contain it:
$ locate libicudata
/home/me/pmbuild/config/external/icu/data/libicudata.a.desc
/usr/lib/libicudata.so
/usr/lib/libicudata.so.62
/usr/lib/libicudata.so.62.1
I think it may be in another icu package, I also need the python dbus module whatever it is and the .mozconfig is this:

Code: Select all

ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
#export  STATIC_JS_API

mk_add_options MOZ_CO_PROJECT=browser
ac_add_options --enable-application=browser

mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/

ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse"
ac_add_options --with-pthreads

#ac_add_options --disable-installer
ac_add_options --disable-updater

ac_add_options --enable-release
ac_add_options --enable-devtools
ac_add_options --enable-jemalloc
ac_add_options --enable-shared-js
ac_add_options --enable-export-js

ac_add_options --enable-strip

ac_add_options --x-libraries=/usr/lib
I will probably figure this out eventually so I can see if it works. :coffee:
Wait, it's all Ohio? Always has been...

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1741
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: palemoon.pdf ?

Unread post by trava90 » 2018-08-15, 15:52

The instructions on the wiki are for building Pale Moon27. If you try to use them to build Pale Moon 28 it will fail.

Expect the wiki to be updated with instructions for building Pale Moon 28 within the next couple of days.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-15, 20:27

Updated instructions would be helpful. :thumbup: This problem seems to be an icu version mismatch:

Code: Select all

$ readelf -s libicudata.so
Symbol table '.dynsym' contains 2 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000001000 0x1998090 OBJECT  GLOBAL DEFAULT    5 icudt62_dat

$ pacman -Qo /usr/lib/libicudata.so
/usr/lib/libicudata.so is owned by icu 62.1-1

intl/icu/source/common/udata.cpp
line 677
            int32_t i;
            for(i = 0; i < commonDataIndex; ++i) {
                if(gCommonICUDataArray[i]->pHeader == &U_ICUDATA_ENTRY_POINT) {
                    /* The linked-in data is already in the list. */
                    return NULL;
                }

intl/icu/source/data/makedata.mak
# Keep the following in sync with the version - see common/unicode/uvernum.h
U_ICUDATA_NAME=icudt58
And this file where the version is defined: intl/icu/source/common/unicode/uvernum.h
is from icu : http://icu-project.org/apiref/icu4c-lat ... ource.html

So I guess the PM source needs some sort of icu autoreconf equivalent to update it, or an older icu 58 version should be installed on the OS.
Wait, it's all Ohio? Always has been...

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35593
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: palemoon.pdf ?

Unread post by Moonchild » 2018-08-15, 20:30

This is why you should not use system libs.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-15, 21:05

I have no preferences what libs I use, I was only following the available instructions - in order to probably delete the result after testing the palemoon.pdf bit. :D
However, I just found what looks like the solution:
intl/update-icu.sh
A built in icu updater script that will automatically fix the source code so it works with a later icu version (hopefully).
Wait, it's all Ohio? Always has been...

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-16, 01:40

icu has moved to a new repo on GitHub in July 2018
Last edited by Lunokhod on 2018-08-16, 13:39, edited 1 time in total.
Wait, it's all Ohio? Always has been...

User avatar
trava90
Contributing developer
Contributing developer
Posts: 1741
Joined: 2013-05-20, 18:19
Location: Somewhere in Sector 001

Re: palemoon.pdf ?

Unread post by trava90 » 2018-08-16, 04:05

Off-topic:
The developer wiki has been updated with instructions for building Pale Moon 28 (including a proper mozconfig).

New Tobin Paradigm

Re: palemoon.pdf ?

Unread post by New Tobin Paradigm » 2018-08-16, 07:39

This may or may not need to be said but I am going to say it never the less.. Our codebase is only setup to properly work with the libs in-tree.. If you use an incompatible lib even if you run it through Mozilla's update scripts it will at best not build properly and at worse fry your profile.

Mozilla's libupdate scripts are only valid for the version of the lib it was last used on. Please see what I said in the past for more info. Also, for the love of god don't distribute anything you build to anyone else.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-17, 03:51

Code: Select all


$ git checkout PM28.0.0b5_Unstable
$ git checkout -b pdf-name
(change mozilla.pdf to palemoon.pdf and commit, put new .mozconfig from wiki in toplevel source dir)
./mach build

...some time later...
79:33.86     INPUT("../../modules/zlib/src/trees.o")
79:33.86     INPUT("../../modules/zlib/src/uncompr.o")
79:33.86     INPUT("../../modules/zlib/src/zutil.o")
79:33.87     INPUT("StaticXULComponentsEnd/StaticXULComponentsEnd.o")
79:33.87
79:33.87 collect2: fatal error: ld terminated with signal 7 [Bus error]
79:33.87 compilation terminated.
79:33.87 make[5]: *** [/home/me/projects/palemoon-UXP/3TEST-UXP/config/rules.mk:782: libxul.so] Error 1
79:33.87 make[5]: *** Deleting file 'libxul.so'
79:34.22 make[4]: *** [/home/me/projects/palemoon-UXP/3TEST-UXP/config/recurse.mk:71: toolkit/library/target] Error 2
79:34.22 make[3]: *** [/home/me/projects/palemoon-UXP/3TEST-UXP/config/recurse.mk:33: compile] Error 2
79:34.22 make[2]: *** [/home/me/projects/palemoon-UXP/3TEST-UXP/config/rules.mk:503: default] Error 2
79:34.22 make[1]: *** [/home/me/projects/palemoon-UXP/3TEST-UXP/client.mk:414: realbuild] Error 2
79:34.22 make: *** [client.mk:170: build] Error 2
79:34.26 536 compiler warnings present.
79:34.50 Notification center failed: The name org.freedesktop.Notifications was not provided by any .service files
Now the build fails linking libxul.so. Presumably this .mozconfig doesn't use system libs without the ac_add_options --enable-shared-js line, I don't know what the options mean, I was just following the wiki instructions.
I had also installed python2-dbus python-dbus since the last try, but now the Notification center (whatever that is) has a new error.
I've no plans for Pale Moon distribution even if I could build it. Distribute it yourselves, it's your project :D
Wait, it's all Ohio? Always has been...

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-21, 03:04

OK, first I wondered if it needed multilib support:

Code: Select all

$ sudo pacman -S lib32-gcc-libs
Packages (2) lib32-glibc-2.28-4  lib32-gcc-libs-8.2.0-2
Same result. Then I saw it was using the usual compiler I already had installed, not the old version:
checking the target C compiler version... 8.2.0
So I added these exports to .mozconfig:

Code: Select all

export CC=/usr/bin/gcc-5
export CXX=/usr/bin/g++-5
export HOST_CC=/usr/bin/gcc-5
export HOST_CXX=/usr/bin/g++-5

$ ./mach run
 0:00.37 /home/me/projects/TEST-UXP/obj-x86_64-pc-linux-gnu/dist/bin/basilisk -no-remote -profile
/home/me/projects/TEST-UXP/obj-x86_64-pc-linux-gnu/tmp/scratch_user
Starts -er- Basilisk :shock:
The print to pdf has a default value of palemoon.pdf - which now makes no sense in Basilisk... more work needed yet :coffee:
I see the wiki mozconfig has the answer now to building Pale Moon not Basilisk, although Basilisk showed something useful.
Last edited by Lunokhod on 2018-08-21, 03:13, edited 1 time in total.
Wait, it's all Ohio? Always has been...

Walter Dnes
Astronaut
Astronaut
Posts: 652
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: palemoon.pdf ?

Unread post by Walter Dnes » 2018-08-21, 05:08

vingtzwanzig wrote: I had also installed python2-dbus python-dbus since the last try, but now the Notification center (whatever that is) has a new error.
I think that it's a mechanism to notify you that the build has finished (popup window or whatever). I ignore that error. At the end of my build script I have a command to play an mp3 file, to let me know the build has finished.
There's a right way
There's a wrong way
And then there's my way

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: palemoon.pdf ?

Unread post by Lunokhod » 2018-08-23, 20:05

python2-dbus and xfce4-notifyd fixed the Notification center error, other desktops would presumably need another notification daemon. Despite the "service file" message from dbus, no systemd was required for that to work. Pale Moon built successfully, in this case in a cp -a of the git pull dir (not using ~/pmbuild ~/pmsrc) at the latest unstable release tag with no optimisation to reduce build time, the build found the correct autoconf and Python versions unaided, but the compiler path had to be put in the .mozconfig -

Code: Select all

mk_add_options AUTOCLOBBER=1
#mk_add_options MOZ_OBJDIR=/home/$USER/pmbuild/
ac_add_options --enable-application=palemoon

#ac_add_options --enable-optimize="-O2"

# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
export CC=/usr/bin/gcc-5
export CXX=/usr/bin/g++-5
export HOST_CC=/usr/bin/gcc-5
export HOST_CXX=/usr/bin/g++-5

ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --with-pthreads

ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater

ac_add_options --x-libraries=/usr/lib
Built - done :wave:
Wait, it's all Ohio? Always has been...

Locked