Skip to contentSkip to conversation

sanity.bbclass: also check invalid char for SDKPATH

PATCH In review Chen Qi 2 participants 3 messages May 18, 2021

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 sanity.bbclass: also check invalid char for SDKPATH

The invalid char check are now only for COREBASE and TMPDIR, however, the SDKPATH with special char could also cause problem.

e.g.
bitbake nativesdk-xxhash
And we get the following error message.
Makefile:422: *** configured libdir (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib) is outside of exec_prefix (/opt/poky/3.3+snapshot/sysroots/x86_6\
4-pokysdk-linux/usr), can't generate pkg-config file. Stop.

This is because we have '+' in SDKPATH.

FOR SDKPATH, the valid char requirement should be the same with TMPDIR.

---
 meta/classes/sanity.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/sanity.bbclass +1 -1
index e907a3566f..727ff5a768 100644
@@ -885,7 +885,7 @@ def check_sanity_everybuild(status, d):
         except:
             pass
 
-    for checkdir in ['COREBASE', 'TMPDIR']:
+    for checkdir in ['COREBASE', 'TMPDIR', 'SDKPATH']:
         val = d.getVar(checkdir)
         if val.find('..') != -1:
             status.addresult("Error, you have '..' in your %s directory path. Please ensure the variable contains an absolute path as this can break some recipe builds in obtuse ways." % checkdir)
Signature · 1 line
2.30.2
#1 lore raw
Quoted 9 lines · Chen Qi

The invalid char check are now only for COREBASE and TMPDIR, however, the SDKPATH with special char could also cause problem.

e.g.
bitbake nativesdk-xxhash
And we get the following error message.
Makefile:422: *** configured libdir (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib)
is outside of exec_prefix (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr), can't generate pkg-config file. Stop.

Quoted 8 lines

This is because we have '+' in SDKPATH.

FOR SDKPATH, the valid char requirement should be the same with TMPDIR.

---
 meta/classes/sanity.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)

Given that the + has been in many of our SDKs for years, should we not fix that individual recipe to handle this correctly, preferably upstream?

It doesn't sound like its a very common issue so may be worth fixing rather than giving up upon...

Cheers,

Richard

author
#2 lore raw
Quoted 21 lines · Richard Purdie
Quoted 9 lines · Chen Qi

The invalid char check are now only for COREBASE and TMPDIR, however, the SDKPATH with special char could also cause problem.

e.g.
bitbake nativesdk-xxhash
And we get the following error message.
Makefile:422: *** configured libdir (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr/lib)
is outside of exec_prefix (/opt/poky/3.3+snapshot/sysroots/x86_64-pokysdk-linux/usr), can't generate pkg-config file. Stop.

Quoted 8 lines

This is because we have '+' in SDKPATH.

FOR SDKPATH, the valid char requirement should be the same with TMPDIR.

---
  meta/classes/sanity.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Given that the + has been in many of our SDKs for years, should we not fix that individual recipe to handle this correctly, preferably upstream?

Quoted 8 lines

It doesn't sound like its a very common issue so may be worth fixing rather than giving up upon...

Cheers,

Richard

Got it. I'll fix the individual recipe.

Best Regards,
Chen Qi