Bug 28809 - v8 headers not found because they depend on nodejs-devel headers that are in non-default search path
Summary: v8 headers not found because they depend on nodejs-devel headers that are in ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: christian barranco
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 32176 32341
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-19 14:20 CEST by Mika Laitio
Modified: 2023-11-30 02:29 CET (History)
1 user (show)

See Also:
Source RPM: nodejs-14.16.0-2.mga8.src.rpm
CVE:
Status comment:


Attachments
Fixes the v8-detection by adding a missing symlink creation to rpm spec file (778 bytes, patch)
2021-04-19 14:27 CEST, Mika Laitio
Details | Diff

Description Mika Laitio 2021-04-19 14:20:35 CEST
Description of problem:

v8-devel rpm should add a symlink from /usr/include/cppgc to /usr/include/node/cppgc

Configure tools can not detect the v8-devel headers due to missing symlink from 
/usr/include/cppgc to /usr/include/node/cppgc. This happens because v8-headers depends from those cppgc headers and at the moment they are in mga at non-standard search path. This causes building of some applications to fail to add v8-support. Fix is to simply to create that symlink just like it is done for example on Fedora. I have attached the required small changes to nodejs-spec file that need to be done and I have also tested them to work.

I have myself detected the problem when building a cbang library with v8 support. This library with v8 support is needed to be able to build the CAMotics g-code tool. I tracked the problem to location where the cbang is using scons (scons is provided by the mga) to detect the v8-headers by using a following line in cbang/config/v8/__init__.py
   conf.CBRequireCXXHeader('v8.h')
In mageia this will fail because small configure test apps for v8 detection will fail to build because they can not detect the cppgc headers.

Similar problem has been reported and fixed in all fedora versions starting from FC 31 where somebody reported similar v8 header detection problem with another application. (R-V8) and fix in Fedore was also to add the symlink from /usr/include/cppgc to /usr/include/node/cppgc.

https://bugzilla.redhat.com/show_bug.cgi?id=1876179


Version-Release number of selected component (if applicable):


How reproducible:
This can be easily tested by downloading and trying to build the cbang library and using grep to detect whether v8-devel headers are found or not.


Steps to Reproduce:
1. urpmi scons v8-devel
2. git clone https://github.com/CauldronDevelopmentLLC/cbang.git
3. scons -C ./cbang | grep v8

this will then show that headers are not detected

Checking for C++ header file v8.h... no
Need C++ header v8.h(cached) error: no result

4. Add required symlink and when doing the build again the v8 will this time get detected as seen on logs
5. sudo ln -s /usr/include/node/cppgc /usr/include/cppgc
6. scons -C ./cbang | grep v8

Checking for C++ header file v8.h... yes
Checking for C library v8... yes
Checking for C library v8_libplatform... yes
Comment 1 Mika Laitio 2021-04-19 14:27:42 CEST
Created attachment 12650 [details]
Fixes the v8-detection by adding a missing symlink creation to rpm spec file
Comment 2 Nicolas Lécureuil 2021-04-19 16:31:34 CEST
ok added this fix in cauldron. 

I will do later  today for mageia 8

CC: (none) => mageia

Comment 3 Lewis Smith 2021-04-19 21:15:20 CEST
Thank you Mika for the very helpful report.

Thanks Nicolas for the lightning response. Assigning this to you as you are already dealing with it.

Assignee: bugsquad => mageia
CC: mageia => (none)

Comment 4 Mika Laitio 2021-07-25 21:58:45 CEST
Hi, the patch creating symlink is still missing from the latest v8-devel in mga8.
Could somebody add it and re-relese v8-devel rpm?
Comment 5 christian barranco 2023-08-16 11:27:56 CEST
Hi. I will fix this while updating to 18.17.1, for both MGA8 and MGA9.

Assignee: mageia => chb0
Depends on: (none) => 32176
CC: (none) => chb0

Marja Van Waes 2023-09-28 18:47:28 CEST

Depends on: (none) => 32341

Comment 6 christian barranco 2023-11-27 12:31:25 CET
Hi. 
This report is solved by mga#32176, which is Resolved. 
Why is this report still open then?
Should I do anything?
Thanks
Comment 7 katnatek 2023-11-30 02:29:15 CET
(In reply to christian barranco from comment #6)
> Hi. 
> This report is solved by mga#32176, which is Resolved. 
> Why is this report still open then?
> Should I do anything?
> Thanks

I close for you

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.