Errors compiling PM from source

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!
Artiom

Errors compiling PM from source

Unread post by Artiom » 2014-06-11, 15:24

cyansmoker wrote:UPDATE

After a brief pm chat with access2godzilla, I setup a Centos6.5 VM; installed some necessary stuff; then successfully built and ran v24.5.0.
I created an AUR package for ARCH compiling PM from source. It worked well for 24.5.0 but now I can not compile the 24.6 from GIT. Did you do any tweaks for your last compilation?

cyansmoker

Re: Looking for a new maintainer

Unread post by cyansmoker » 2014-06-12, 22:34

Not especially. What errors are you seeing?

Artiom

Re: Looking for a new maintainer

Unread post by Artiom » 2014-06-13, 07:35

The errors are in the #define lines, saying something like 'Using "unsigned" twice'. Looks like some #defines are already defined elsewhere. I will post the exact errors later today.

access2godzilla

Re: Errors compiling PM from source

Unread post by access2godzilla » 2014-06-13, 07:51

Please post the versions of the toolchains that you're using. Some, like gcc-4.8.* are known not to play nice.

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

Re: Looking for a new maintainer

Unread post by Moonchild » 2014-06-13, 07:59

Artiom wrote:The errors are in the #define lines, saying something like 'Using "unsigned" twice'. Looks like some #defines are already defined elsewhere. I will post the exact errors later today.
I checked the AUR before, and it was listed as a source package. Judging by this, it seems you're creating binary packages?
Are the AUR packages binaries or sources? If they are own-compiled binaries, please don't publicly redistribute without getting in touch with me. Source packages are fine. I'm also not going to be draconic about this, of course, but repackaging officially-built binaries and providing your own binaries from source for redistribution are two completely different matters. I'm lenient about the former, but much less so about the latter when carrying official branding, for obvious reasons.
See also http://www.palemoon.org/redist.shtml
"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

access2godzilla

Re: Errors compiling PM from source

Unread post by access2godzilla » 2014-06-13, 08:02

Source packages are those which download the source and compile them automatically.

jumba/sumt's palemoon-bin is a binary package, but it behaves like a "download stub" instead of a true binary package (user contributed packages with binaries in them are not allowed on AUR).

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

Re: Errors compiling PM from source

Unread post by Moonchild » 2014-06-13, 08:13

access2godzilla wrote:user contributed packages with binaries in them are not allowed on AUR.
All good then :) If people pull the packages to automatically compile them on their own machine, that's all good.
"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

Artiom

Re: Errors compiling PM from source

Unread post by Artiom » 2014-06-13, 12:28

My package isa source AUR package, so it is compiled on the user's machine.
Here are the errors from configure

Code: Select all

 0:32.20 configure:23665: checking for valid optimization flags
 0:32.20 configure:23676: gcc -c -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -pthread -O2 -msse2 -mfpmath=sse -D_FORTIFY_SOURCE=2 conftest.c 1>&5
 0:32.20 In file included from configure:23669:0:
 0:32.20 confdefs.h:12:16: error: duplicate 'unsigned'
 0:32.20  #define size_t unsigned
 0:32.20                 ^
 0:32.20 confdefs.h:10:15: error: two or more data types in declaration specifiers
 0:32.20  #define off_t long
 0:32.20                ^
 0:32.20 configure: failed program was:
 0:32.20 #line 23669 "configure"
 0:32.20 #include "confdefs.h"
 0:32.20 #include <stdio.h>
 0:32.20 int main() {
 0:32.20 printf("Hello World\n");
 0:32.20 ; return 0; }
 0:32.20 *** Fix above errors and then restart with               "/usr/bin/make -f client.mk build"
 0:32.20 /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/client.mk:329: recipe for target 'configure' failed
 0:32.21 make[2]: *** [configure] Error 1
 0:32.21 /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/client.mk:343: recipe for target '/usr/local/src/MYAUR/palemoon/src/pmbuild/Makefile' failed
 0:32.21 make[1]: *** [/usr/local/src/MYAUR/palemoon/src/pmbuild/Makefile] Error 2
 0:32.21 client.mk:172: recipe for target 'build' failed
 0:32.21 make: *** [build] Error 2
 0:32.25 0 compiler warnings present.

In configure it can be fixed with a simple replacement:

Code: Select all

sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" configure
I found this workaround somewhere in the Net and looks like it's a very very old configure bug.
But then in compile:

Code: Select all

gcc -o dummy.o -c -I../../../dist/system_wrappers -include /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT  -I/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/build/unix/elfhack -I. -I../../../dist/include  -I/usr/local/src/MYAUR/palemoon/src/pmbuild/dist/include/nspr -I/usr/local/src/MYAUR/palemoon/src/pmbuild/dist/include/nss      -fPIC  -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -msse2 -mfpmath=sse -fomit-frame-pointer   -include ../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/dummy.o.pp  /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/build/unix/elfhack/dummy.c
In file included from <command-line>:0:0:
./../../../mozilla-config.h:291:16: error: duplicate âunsignedâ
 #define size_t unsigned
                ^
test-array.c
gcc -o test-array.o -c -I../../../dist/system_wrappers -include /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/gcc_hidden.h -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT  -I/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/build/unix/elfhack -I. -I../../../dist/include  -I/usr/local/src/MYAUR/palemoon/src/pmbuild/dist/include/nspr -I/usr/local/src/MYAUR/palemoon/src/pmbuild/dist/include/nss      -fPIC  -Wall -Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits -Wempty-body -Wsign-compare -Wno-unused -Wcast-align -std=gnu99 -fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections -pthread -pipe  -DNDEBUG -DTRIMMED -O2 -msse2 -mfpmath=sse -fomit-frame-pointer   -include ../../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/test-array.o.pp  /usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/build/unix/elfhack/test-array.c
./../../../mozilla-config.h:288:16: error: two or more data types in declaration specifiers
 #define mode_t int
                ^
./../../../mozilla-config.h:289:15: error: two or more data types in declaration specifiers
 #define off_t long
               ^
./../../../mozilla-config.h:290:15: error: two or more data types in declaration specifiers
 #define pid_t int
               ^
In file included from <command-line>:0:0:
./../../../mozilla-config.h:291:16: error: duplicate âunsignedâ
 #define size_t unsigned
                ^
./../../../mozilla-config.h:288:16: error: two or more data types in declaration specifiers
 #define mode_t int
                ^
./../../../mozilla-config.h:289:15: error: two or more data types in declaration specifiers
 #define off_t long
               ^
./../../../mozilla-config.h:290:15: error: two or more data types in declaration specifiers
 #define pid_t int
               ^
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/rules.mk:1103: recipe for target 'test-ctors.o' failed
make[7]: *** [test-ctors.o] Error 1
make[7]: *** Waiting for unfinished jobs....
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/rules.mk:1103: recipe for target 'test-array.o' failed
make[7]: *** [test-array.o] Error 1
make[7]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild/build/unix/elfhack'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/makefiles/target_libs.mk:59: recipe for target 'libs' failed
make[6]: *** [libs] Error 2
make[6]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild/build/unix'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/makefiles/target_libs.mk:59: recipe for target 'libs' failed
make[5]: *** [libs] Error 2
make[5]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild/build'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/makefiles/target_libs.mk:16: recipe for target 'libs_tier_base' failed
make[4]: *** [libs_tier_base] Error 2
make[4]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/rules.mk:737: recipe for target 'tier_base' failed
make[3]: *** [tier_base] Error 2
make[3]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/config/rules.mk:670: recipe for target 'default' failed
make[2]: *** [default] Error 2
make[2]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/pmbuild'
/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release/client.mk:372: recipe for target 'realbuild' failed
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory '/usr/local/src/MYAUR/palemoon/src/Pale-Moon-24.6.1_Release'
client.mk:172: recipe for target 'build' failed
make: *** [build] Error 2

In previous version I was able to insert the "patch" between configure creation and make. This time configure is not generated until the global make statement.
Is there a way to split configure and make?

Artiom

Re: Errors compiling PM from source

Unread post by Artiom » 2014-06-13, 12:32

access2godzilla wrote:Please post the versions of the toolchains that you're using. Some, like gcc-4.8.* are known not to play nice.
Name : gcc
Version : 4.8.2-8
:(

I have 4.9 available in the repository. Does it worth a try?

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

Re: Errors compiling PM from source

Unread post by Moonchild » 2014-06-13, 12:42

You'll need 4.7
"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

access2godzilla

Re: Errors compiling PM from source

Unread post by access2godzilla » 2014-06-13, 12:47

@Artiom, did you see this: https://developer.mozilla.org/en-US/doc ... requisites (Note the arch linux section where it says about python).
Moonchild wrote:You'll need 4.7
Actually, gcc 4.8 does work, just that it broke PNG decoding for me (http://forum.palemoon.org/viewtopic.php?f=37&t=4335).

Artiom

Re: Errors compiling PM from source

Unread post by Artiom » 2014-06-13, 13:36

Moonchild wrote:You'll need 4.7
Impossible on Arch. It is a rolling distro and it is already "rolled" on 4.9
I see on the Mozilla site that clang could be a better choice. Will try it later.

Anyway 24.5 was successfully compiled with 4.8. Is is something new in 24.6 that brakes gcc?
I would also try to split configure and make, any clues for it?

Artiom

Re: Errors compiling PM from source

Unread post by Artiom » 2014-06-13, 13:38

access2godzilla wrote:@Artiom, did you see this: https://developer.mozilla.org/en-US/doc ... requisites (Note the arch linux section where it says about python).
Yes, I have read it and I used this guide to create my PKGBUILD

access2godzilla

Re: Errors compiling PM from source

Unread post by access2godzilla » 2014-06-13, 14:12

Artiom wrote:Impossible on Arch.
It is possible, just that you have to use packages from another distro to get that done, if you're willing to put the effort. Debian wheezy packages should be a good choice for this.

Artiom

Re: Errors compiling PM from source

Unread post by Artiom » 2014-06-13, 15:01

I was misunderstood. The AUR system is to share source packages with other users. I surely can find a way to compile it for me, but another user should have a possibility to compile it using standard Arch package system. So I need to create a special gcc package, which will install to an special fs tree (in order to coexist with distribution's package), than tweak palemoon tools to use it instead of Arch's gcc. This already sounds too much complicated... even without considering compilation time.
I will try clang first, at least it is in the repository.

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

Re: Errors compiling PM from source

Unread post by Moonchild » 2014-06-13, 15:06

Artiom wrote:I was misunderstood. The AUR system is to share source packages with other users. I surely can find a way to compile it for me, but another user should have a possibility to compile it using standard Arch package system. So I need to create a special gcc package, which will install to an special fs tree (in order to coexist with distribution's package), than tweak palemoon tools to use it instead of Arch's gcc. This already sounds too much complicated... even without considering compilation time.
I will try clang first, at least it is in the repository.
All I can say is: welcome to the wonderful world of Mozilla code. :ugeek:
"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

jumba

Re: Errors compiling PM from source

Unread post by jumba » 2014-06-13, 16:41

Artiom wrote:Anyway 24.5 was successfully compiled with 4.8. Is is something new in 24.6 that brakes gcc?
Hi artiom! It compiled successfully for me too but it was unstable and crashed after opening few web pages.

maybe unrelated, but I noticed that you have commented out this line in your mozconfig:

Code: Select all

#ac_add_options --disable-webrtc
shouldn't webrtc be disabled on pm builds?

jjacky

Re: Errors compiling PM from source

Unread post by jjacky » 2014-06-13, 16:51

I was able to compile pale moon on Arch (x64) w/ gcc-4.9 just fine (well, almost, but unrelated), as along as I removed -D_FORTIFY_SOURCE=2 -- maybe try removing it from your CPPFLAGS.

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

Re: Errors compiling PM from source

Unread post by Moonchild » 2014-06-13, 19:55

WebRTC should indeed be disabled on Pale Moon.
If you are building a package for official redistribution, please do not change the official feature set or included modules.
"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

jjacky

Re: Errors compiling PM from source

Unread post by jjacky » 2014-06-13, 20:26

Moonchild wrote:If you are building a package for official redistribution, please do not change the official feature set or included modules.
Is there such a list (of options to use/not to use) to build PM somewhere?

Locked