Bug 1150 - realpath issue when building QT components
Summary: realpath issue when building QT components
Status: RESOLVED FIXED
Alias: None
Product: Pseudo
Classification: Yocto Project Subprojects
Component: pseudo (show other bugs)
Version: 1.1
Hardware: x86 Multiple
: Medium major
Target Milestone: master
Assignee: Mark Hatle
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-06-09 08:54 UTC by Mark Hatle
Modified: 2011-06-09 14:07 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.