[Linux] Error build with gcc10

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

[Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-18, 04:31

Hello, one more thing. With gcc12 it builds without problems, but on gcc10 I have the following problem in the build:

Code: Select all

>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/MacroAssembler.h:17,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineJIT.h:17,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineIC.h:19,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineDebugModeOSR.h:10,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineDebugModeOSR.cpp:6,

>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/obj-x86_64/js/src/Unified_cpp_js_src9.cpp:2:
> In member function 'void js::jit::X86Encoding::BaseAssemblerX64::movq_mr(int32_t, js::jit::X86Encoding::RegisterID, js::jit::X86Encoding::RegisterID, int, js::jit::X86Encoding::RegisterID)',
>     inlined from 'void js::jit::Assembler::movq.constprop(const js::jit::Operand&, js::jit::Register)' at /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x64/Assembler-x64.h:396:25:
> /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x64/BaseAssembler-x64.h:595:13: error: '%s' directive argument is null [-Werror=format-overflow=]
>   595 |         spew("movq       " MEM_obs ", %s", ADDR_obs(offset, base, index, scale), GPReg64Name(dst));
          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


> In file included from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x86-shared/BaseAssembler-x86-shared.h:35,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x64/BaseAssembler-x64.h:9,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x86-shared/Assembler-x86-shared.h:16,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x64/Assembler-x64.h:247,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x86-shared/MacroAssembler-x86-shared.h:14,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x64/MacroAssembler-x64.h:11,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/MacroAssembler.h:17,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineJIT.h:17,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineIC.h:19,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineDebugModeOSR.h:10,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/BaselineDebugModeOSR.cpp:6,
>                  from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/obj-x86_64/js/src/Unified_cpp_js_src9.cpp:2:
>



> /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h: In member function 'void js::jit::Assembler::movq.constprop(const js::jit::Operand&, js::jit::Register)':
> /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h:45:32: note: format string is defined here
>    45 | #define MEM_obs   MEM_o   "(%s,%s,%d)"
>       |                                ^~
> cc1plus: some warnings being treated as errors
^^^^^

> make[5]: *** [/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/config/rules.mk:884: Unified_cpp_js_src9.o] Error 1
> make[5]: Leaving directory '/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/obj-x86_64/js/src'
> make[4]: *** [/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/config/recurse.mk:71: js/src/target] Error 2
> make[3]: *** [/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/config/recurse.mk:33: compile] Error 2
> make[2]: *** [/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/platform/config/rules.mk:494: default] Error 2
> make[1]: *** [/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon/client.mk:406: realbuild] Error 2
> make[1]: Leaving directory '/usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon'
> make: *** [client.mk
I still do not understand how to fix it, I see what the problem is 😉

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 317
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets
Contact:

Re: [Linux] Error build with gcc10

Unread post by Basilisk-Dev » 2022-10-20, 17:09

from /usr/src/RPM/BUILD/palemoon-31.3.0.1/palemoon...
Are you trying to package Pale Moon for Fedora or CentOS or something like that?
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-22, 05:36

https://git.altlinux.org/gears/p/palemoon.git

Sorry for not answering sooner, I do this in my free time, usually on weekends ;-)

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

Re: [Linux] Error build with gcc10

Unread post by Moonchild » 2022-10-22, 08:30

Seems like you're patching the source tree?
That greatly diminishes the ways in which we can help.
"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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 782
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: [Linux] Error build with gcc10

Unread post by jobbautista9 » 2022-10-22, 09:45

@Ruslandh Have you tried building Pale Moon without your patches using GCC 10? Just in case.
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-25, 04:09

Ok, I can try to run such an assembly, in the evening after work I will answer if it worked out ;-)

But there were no problems on gcc12

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-25, 04:19

Perhaps the problem is not in gcc, but in another, older build environment.

And do not tell me where this "problem code"? Just what hypotheses can be why the assembly code is not built in.

Excuse me, of course I can look for this place myself, but there is just not enough free space for work.

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-25, 04:32

Now I'll try to set the assembly with gcc10 in Sisyphus, if it is assembled there, then this is definitely not a matter of gcc10, but of something else.

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-25, 17:38

No, the problem is not with the gcc version, the problem is somewhere else.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: [Linux] Error build with gcc10

Unread post by moonbat » 2022-10-25, 23:09

This isn't your Twitter account - so there's no need to provide live updates of whatever you're doing. Your comments are of no use to anyone here either to help you or for anyone else with the same problem. If you need assistance, then finish whatever you're doing and provide a detailed description of whatever worked or didn't work with logs as appropriate (and enclosed within code tags, i.e. the button in the compose window marked </>)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Ruslandh
Moongazer
Moongazer
Posts: 8
Joined: 2022-10-16, 13:43
Location: russian
Contact:

Re: [Linux] Error build with gcc10

Unread post by Ruslandh » 2022-10-28, 03:59

Ok, here is what one smart person wrote to me ;-) :

"Firstly, this is not an assembler insert, this is jit code.

The function spew is defined somewhere with a special compiler hint attribute that the arguments are similar to the printf() argument format.

This version of the compiler considers passing NULL for %s to be an unconditional error. Although even printf prints NULL as (null), that is, it processes correctly. So here it may be intentional (but you need to understand).

The difference with p10 may be the compiler version.

Try disabling this -Werror, and check if it works after build."

Locked