Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc[jit][-march!=current] requires 2 build
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Wed Dec 07, 2022 10:34 pm    Post subject: gcc[jit][-march!=current] requires 2 build Reply with quote

sys-devel/gcc:12 works where native(skylake) build, app-editors/emacs USE=jit included.
sys-devel/gcc:12 has also being build with -B and -march=core2 -mtune=core2,
then installed on targeted system where it builds new packages.

However app-editors/emacs USE=jit fails as:
Code:
 checking for libgccjit.h... yes
configure: error: The installed libgccjit failed to compile and run a test program using
the libgccjit library; see config.log for the details of the failure.
The test program can be found here:
<https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html>.
You can try compiling it yourself to investigate the issues.
Please report the issue to your distribution if libgccjit was installed
through that.
You can find the instructions on how to compile and install libgccjit from
source on this site:
<https://gcc.gnu.org/wiki/JIT>
Processing as described in
Code:
https://gcc.gnu.org/onlinedocs/jit/intro/tutorial01.html
builds fine, but fails to run as
Code:
~ # LC_MESSAGES=C ./tut01-hello-world
Instruction non permise
This binary runs fine on skylake.
So it seems binary generated has skylake level of insructions.

How to have libgccjit working fine on targeted system?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "


Last edited by CaptainBlood on Thu Dec 29, 2022 12:37 am; edited 4 times in total
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 2400

PostPosted: Wed Dec 07, 2022 11:34 pm    Post subject: Reply with quote

The most likely issue here is that the binpkg installed was actually built with skylake instead of core2?

If the GCC being used on a core2 system was really built with -march and -mtune for core2, I can't see this happening.

I assume the system where tut01-hello-world fails is a core2?
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Wed Dec 07, 2022 11:52 pm    Post subject: Reply with quote

sam_ wrote:
The most likely issue here is that the binpkg installed was actually built with skylake instead of core2?
Build on skylake with -march and -mtune for core2.
sam_ wrote:
If the GCC being used on a core2 system was really built with -march and -mtune for core2, I can't see this happening.?
It only happens when libgccjit is involved.
sam_ wrote:
I assume the system where tut01-hello-world fails is a core2?
generates it fine but fails to run, indeed.

It's the first time I have to operate so, as target system has only 1Gb RAM; I may have missed something somewhere.

EDIT: As I understand your POV, what forces libgccjit to generate skylake class of instructions?

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Thu Dec 08, 2022 12:50 am    Post subject: Reply with quote

bug report
Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Thu Dec 08, 2022 1:12 am    Post subject: Reply with quote

gcc[jit] quitted alpha status almost 2 yrs ago.
pretty young still :cry:
Maybe it's only me missing something, or being too old :roll:

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Wed Dec 14, 2022 12:36 pm    Post subject: Reply with quote

Likely to require to build gcc with a targeted CPU gcc built.
See bugzilla above.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Thu Dec 29, 2022 12:30 am    Post subject: Reply with quote

The issue raised again when upgrading to 12.2.1_p20221224.
Cf bug report above.
This is very niche issue.
app-editors/emacs is the only package were gcc[jit] is involved I know of.
There might be others, though.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
mns
n00b
n00b


Joined: 13 Jan 2022
Posts: 5

PostPosted: Thu Dec 29, 2022 7:17 pm    Post subject: jit Reply with quote

its probably silly of me to ask about jit flag on gcc. :)
_________________
mns
Back to top
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 4118

PostPosted: Fri Dec 30, 2022 7:46 am    Post subject: Reply with quote

mns;

Welcome to Gentoo,

GCC Wiki

Dcoumentation entry point

Tutorial part 1: “Hello world” gives a good example how to use it from a command line perspective.

As far as portage is concerned emacs[jit] requires gcc[jit].

emacs[jit] enables byte compiling of emacs lisp code; whether internal or external.

Thks 4 ur attention, interest & support.
_________________
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum