[Scons-users] Qt5 build on OSX

Dirk Bächle tshortik at gmx.de
Tue Dec 27 07:48:19 EST 2016


Hi Daniele,


thanks a lot for reporting your problems to this mailing list and 
including some references to work that has been done earlier.

When I followed the provided URLs, I saw that you got an answer from 
paveljanik for how to restore the *.pc files under Qt 5.7.x as well. Can 
you try the described steps and report back if they worked?


Regarding the "OSX framework" support for the Qt4/Qt5 tools, there has 
been a pull request by Philip Kraus, if I remember correctly. But it 
didn't make it into the main branch because his solution broke part of 
the original functionality under Linux. If you have access to an OSX 
machine and would be ready to work on this some more just raise your 
hand. I'd be more than glad to work together with you on this issue.


Best regards,


Dirk


On 26.12.2016 14:31, Daniele Trimarchi wrote:
> Hi all,
>
> I have read the posts about building Qt5 with Scons on OSX using the 
> Scons qt5 tool provided by dirkbaechle 
> (https://pairlist4.pair.net/pipermail/scons-users/2014-November/003155.html 
> <https://pairlist4.pair.net/pipermail/scons-users/2014-November/003155.html>). 
> Unfortunately the files provided in that thread are not available 
> anymore.
>
> I am running OSx10.11.6 and Qt5.7, from the Qt installer online. I 
> have not compiled Qt5.7 from sources, nor used the macPort (or brew) 
> installation.
>
> I think that I fall in the same problem highlighted  for Qt5.6 by
> paveljanik 
> <https://github.com/paveljanik> (https://github.com/bitcoin/bitcoin/issues/7714 
> <https://github.com/bitcoin/bitcoin/issues/7714>).
>
> Namely, I get the error message:
>
> Package Qt5Gui was not found in the pkg-config search path.
>
> Perhaps you should add the directory containing `Qt5Gui.pc'
>
> to the PKG_CONFIG_PATH environment variable
>
> No package 'Qt5Gui' found
>
>
> Which I recognise as true indeed, as my 
> $(QT5PATH)/clang_64/lib/pkgconfig only contains Qt5OpenGLExtensions.pc 
> and Qt5UiTools.pc.
>
> I am confused about what am I supposed to do:
>
> - Rebuilding Qt from sources ?
> - Installing Qt5 with macPorts or Homebrew ?
> - Doing something else, perhaps related to the OS X frameworks..?
>
> I'd be extremely grateful if someone could shed some light.
>
> Thanks,
>               Daniele
>
>
>
> -------- My SConstruct: --------------------
>
> importos
>
>
> # Define a common build environment
>
> common_env = Environment()
>
>
> qtdir='/Users/dtrimarchi/third_party/Qt/5.7'
>
>
> qtEnv = common_env.Clone()
>
>
> qtEnv['ENV']['PKG_CONFIG_PATH'] = [
>
>                                 os.path.join(qtdir,'lib/pkgconfig'),
>
> '/opt/local/bin'
>
>                                 ]
>
> qtEnv['QT5DIR']=qtdir
>
> qtEnv['ENV']['PATH'] += 
> ':/opt/local/bin:/Users/dtrimarchi/third_party/Qt/5.7/clang_64/bin'
>
>
> QT_LIBS=[
>
> '-framework QtGui',
>
> '-framework QtCore',
>
> '-framework QtNetwork'
>
>       ]
>
>
>
> QT_INCS=[
>
>         os.path.join(qtdir,'clang_64/lib/QtGui.framework/Headers'),
>
>         os.path.join(qtdir,'clang_64/lib/QtCore.framework/Headers'),
>
>         os.path.join(qtdir,'clang_64/lib/QtNetwork.framework/Headers')
>
>       ]
>
>
>
> QT_LIBPATH= [
>
>           os.path.join(qtdir,'clang_64/lib'),
>
>           ]
>
>
> qtEnv.Tool('qt5')
>
>
> Export('common_env qtEnv')
>
>
> # Call to the sconscript
>
> #qtEnv.SConscript('SConscript')
>
> #env.SConscript('SConscript',{'qtEnv': qtEnv})
>
>
> qtEnv.EnableQt5Modules([
>
> 'QtGui',
>
> 'QtCore',
>
> 'QtNetwork'
>
>                     ])
>
>
> qtEnv.Program('qtTest', Glob('*.cpp')+Glob('*.qrc'),
>
>             CPPPATH = THIRD_PARTY_INCS,
>
>             LIBS=QT_LIBS,
>
>             LIBPATH=QT_LIBPATH
>
>             )
>
>
> -----------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20161227/068081c2/attachment.html>


More information about the Scons-users mailing list