Bug 1150

Summary: realpath issue when building QT components
Product: [Yocto Project Subprojects] Pseudo Reporter: Mark Hatle <mark.hatle>
Component: pseudoAssignee: Mark Hatle <mark.hatle>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium CC: sgw, yp.pseudo.watcher, yp.watcher
Version: 1.1   
Target Milestone: master   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Mark Hatle 2011-06-09 08:54:44 UTC
The following is from an email exchange, taken with permission from the original report by Jani Uusi-Rantala:


I'm working for a research project within Nokia where we're (among other
things) experimenting with the fruits of Yocto project. When
cross-compiling QtMobility within Yocto I noticed an interesting issue
with Pseudo. It was obvious that QDir::canonicalPath wasn't working as
expected which after further digging led to realisation that realpath
isn't working for the realpath(path, NULL) case at least. This broke all
of Qt's tools (qmake, moc) in certain use cases. I verified this to be
problem when PSEUDO_DISABLED is 1 with the attached trivial test case.


Compiling and running the test normally without pseudo (works fine):

uusirant@4fiw00588:~/tmp$ gcc test_realpath.c -o test_realpath
uusirant@4fiw00588:~/tmp$ ./test_realpath
Returned path: /usr
Expected.....: /usr


----
Here's how it looks with PSEUDO_DISABLED=0 (works fine):

uusirant@4fiw00588:~/tmp$ PSEUDO_DISABLED=0 ../pseudo-install/bin/pseudo
pseudo: Warning: PSEUDO_PREFIX unset, defaulting to
/home/uusirant/pseudo-install.
root@4fiw00588:~/tmp# gcc test_realpath.c -o test_realpath
root@4fiw00588:~/tmp# ./test_realpath
Returned path: /usr
Expected.....: /usr

---
And here's with PSEUDO_DISABLED=1 (realpath fails with EINVAL):

uusirant@4fiw00588:~/tmp$ PSEUDO_DISABLED=1 ../pseudo-install/bin/pseudo
pseudo: Warning: PSEUDO_PREFIX unset, defaulting to
/home/uusirant/pseudo-install.
uusirant@4fiw00588:~/tmp$ gcc test_realpath.c -o test_realpath
uusirant@4fiw00588:~/tmp$ ./test_realpath
realpath: Invalid argument
Comment 1 Mark Hatle 2011-06-09 08:55:36 UTC
Upstream author has confirmed the issue and a patch is pending.
Comment 2 Mark Hatle 2011-06-09 09:43:47 UTC
Fixed:

http://git.yoctoproject.org/cgit/cgit.cgi/pseudo/commit/?id=c2f7c5ad8ef0f9c94a2a8382c109c8c6e16c8b18

Also verified by the original submitter.