Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.2
-
symbian-sbsv2 in linux
-
c029fa9db9949f7620f5cd07341bbd076a9dfedb
Description
Apparently Symbian build system cannot handle symbolic links, so the configure script copies the default mkspec over instead of creating a symbolic link, when symbian-sbsv2 spec is used:
if echo "$XPLATFORM" | grep "symbian-sbsv2" > /dev/null ; then #Link is not supported for Symbian build system cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default else ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default fi
The default spec not being a symbolic link causes a failure to correctly detect symbian-sbsv2 scopes when running qmake, because it expects a symbolic link in QMakeProject::isActiveConfig():
#ifdef Q_OS_UNIX else if(spec == "default") { static char *buffer = NULL; if(!buffer) { buffer = (char *)malloc(1024); qmakeAddCacheClear(qmakeFreeCacheClear, (void**)&buffer); } int l = readlink(Option::mkfile::qmakespec.toLatin1(), buffer, 1024); if(l != -1) { buffer[l] = '\0'; QString r = buffer; if(r.lastIndexOf('/') != -1) r = r.mid(r.lastIndexOf('/') + 1); if((regex && re.exactMatch(r)) || (!regex && r == x)) return true; } } #elif defined(Q_OS_WIN)
The current workaround for this problem is to manually add "CONFIG += symbian-sbsv2" to the beginning of mkspecs/default/qmake.conf after running configure, which is of course not an acceptable solution in the long run. If configure script could do this automatically, then no qmake changes would be required.
Note that on Windows side where symbolic links are not allowed, this issue is handled by addition of QMAKESPEC_ORIGINAL value into the mkspecs/default/qmake.conf and including the original conf via relative include. The same relative inclusion of original is done for all ".conf", ".prf", and ".h" files under each mkspec. Doing these relative inclusions might be somewhat difficult to achieve with the configure script on linux side. Luckily they are not actually necessary for symbian-sbsv2 spec, which could happily work off copies of originals, as the default and symbian-sbsv2 mkspecs are on the same level in directory tree.