Advertisement
peter9477

using g++ or qcc

Jun 26th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.80 KB | None | 0 0
  1. 16:36 <@peter9477> canurabus: Process 27066527 (python3.2) terminated SIGSEGV code=1 fltno=11 ip=7879b318(/base/lib/libstdc++.so.6.0.13@_ZN9__gnu_cxx18__exchange_and_addEPVii+0x40) mapaddr=000ab318. ref=00000000 bdslot=1
  2. 16:37 <@peter9477> i guess it's not guaranteed to be gone...
  3. 16:39 < canurabus> peter9477, i wish the kdab guys would take a look at that... its a pretty evil bug
  4. 16:39 < canurabus> but why are you compiling with libstdc++?
  5. 16:40 < canurabus> stick with libcpp and everything magically works :)
  6. 16:42 <@peter9477> canurabus: i'm not, as far as i know
  7. 16:42 <@peter9477> i'm using the vanilla qt-qnx build recipe still
  8. 16:43 < canurabus> you're explicitly linking against libstdc++ somewhere along the way
  9. 16:43 < canurabus> maybe when you built python? or pyQt or whatever you're using?
  10. 16:44 < lewellyn> python comes with the os
  11. 16:44 < canurabus> if you built anything with the "ntox-*" tools instead of using "qcc -lang-c++" it links against libstdc++
  12. 16:45 <@peter9477> canurabus: our complete recipe for the entire package is here http://hg.microcode.ca/blackberry-py/wiki/Building%20PySide
  13. 16:45 < berrybot> Short URL: http://bit.ly/KM1nvv
  14. 16:45 <@peter9477> the Qt part is just what's after "to build Qt" on that page
  15. 16:45 <@peter9477> straight off the regular qt-qnx build page
  16. 16:46 <@peter9477> with vanilla bbndk 2.0.1
  17. 16:46 < canurabus> you're building pyside using the wrong tools
  18. 16:46 <@peter9477> you may be right, but i know nothing about that
  19. 16:46 < canurabus> ie... "DCMAKE_CXX_COMPILER="$QNX_HOST/usr/bin/ntoarmv7-g++" \"
  20. 16:46 < canurabus> you need to use qcc
  21. 16:47 <@peter9477> canurabus: ah, i see.. this isn't about Qt, it's about our PySide stuff
  22. 16:47 < Luqman> the fact that one of the builds i was using built Qt with qcc but a Qt plugin with g++ was really annoying
  23. 16:47 < Luqman> apparantly Qt cares about that
  24. 16:47 <@peter9477> HorizonXP: you getting that? you'd know what to do i assume
  25. 16:49 < lewellyn> peter9477: i think i said that you need to be using qcc a while ago
  26. 16:49 < canurabus> until kdab or whoever fixes the libstdc++ issues... id say stick to building everything with the qcc driver and libcpp. It's insanely annoying because most foss projects are built against gcc/g++ and you may have to go through and make minor changes to source ... but thats the only way ive gotten everything to play nice.
  27. 16:49 < lewellyn> Luqman: qt doesn't. c++ does.
  28. 16:50 < Luqman> lewellyn: no, Qt does care in terms of loading plugins. See QT_BUILD_KEY
  29. 16:50 < lewellyn> Luqman: iirc qcc and gcc aren't guaranteed to mangle identically, plus you may be linking against different c++ libs
  30. 16:51 < lewellyn> in the case of peter9477's paste, that's certainly g++
  31. 16:51 < lewellyn> "gnu_cxx" is in the symbol
  32. 16:52 < Luqman> yes, that was the problem the main Qt libraries were built with qcc but the plugins with g++ so it would refuse to load them
  33. 16:52 < Luqman> though, interestingly hex editing the plugins to say they were built with qcc made things work :P
  34. 16:53 < lewellyn> Luqman: which is probably not directly qt's fault ;)
  35. 16:53 < lewellyn> Luqman: desktops will start seeing that more soon.
  36. 16:53 < lewellyn> since we'll start seeing people trying to mix clang and gcc
  37. 16:53 < lewellyn> (solaris has had the fun for years with gcc and studio)
  38. 16:53 < Luqman> ya, it was a mistake in the build proccess, they eventually realized it
  39. 17:02 <@peter9477> lewellyn: you may have said i should be using qcc, but you may not have realized just telling me that would mean anything
  40. 17:03 <@peter9477> i have no idea what g++ and gcc and qcc are or how they differ, and never really paid any attention to the contents of those defines
  41. 17:03 <@peter9477> other than to change them from what rpaskowitzh originally had with bbndk-1.0/host/macosx/x86/usr/bin/arm-unknown-nto-qnx6.5.0eabi-g++
  42. 17:04 <@peter9477> or maybe it was HorizonXP who changed them... i doubt either of us spent any time thinking about it
  43. 17:06 <@peter9477> lewellyn: canurabus okay, so there are about 37 different compilers in NDK 2.0.1, which exact one shoudl we use? just qcc?
  44. 17:06 < lewellyn> peter9477: Not here.
  45. 17:06 <@peter9477> and there are two things there anyway... gcc and g++
  46. 17:06 < lewellyn> qcc is a magic wrapper around nto*-g(cc|++)
  47. 17:06 <@peter9477> one is a CXX compiler? whatever that is...
  48. 17:06 < lewellyn> CXX is C++
  49. 17:07 <@peter9477> like that's obvious (well, it mostly was, but remember how long ago i actually did c++)
  50. 17:07 < lewellyn> + isn't a valid character on every filesystem
  51. 17:07 <@peter9477> lewellyn> qcc is a magic wrapper around nto*-g(cc|++)
  52. 17:07 <@peter9477> so if qcc is a magic wrapper, then i should use just "qcc" to get this magic?
  53. 17:07 < lewellyn> pretty much
  54. 17:07 <@peter9477> and use it for both defines?
  55. 17:07 < lewellyn> you can read the qcc script for more info
  56. 17:07 <@peter9477> please no
  57. 17:07 < lewellyn> it's actually not that bad
  58. 17:08 < lewellyn> it's the scripts it calls that are bad
  59. 17:08 <@peter9477> i'm quite happy if someone just tells me "put usr/bin/qcc in place of both defines"
  60. 17:08 <@peter9477> or whatever is required
  61. 17:09 <@peter9477> i take it there's no q++
  62. 17:12 <@peter9477> "The C++ compiler "/home/devuser/bbndk-2.0.1/host/linux/x86/usr/bin/qcc" is not able to compile a simple test program.
  63. 17:12 <@peter9477> "
  64. 17:12 <@peter9477> Okay, so stumped already...
  65. 17:13 <@peter9477> presumably using "qcc" for both is NOT what I want?
  66. 17:13 < lewellyn> peter9477: qcc takes different options from gcc
  67. 17:14 < lewellyn> i'm in the middle of migrating a domain's email from one service to another atm, so i can't really be too helpful atm.
  68. 17:14 <@peter9477> then I guess this can sit until someone can help out
  69. 17:15 <@peter9477> but are you saying that "qcc" should adequately replace both the C and CXX compiler defines there?
  70. 17:17 < Luqman> peter9477: you can't just call qcc by itself
  71. 17:17 < Luqman> something like qcc -V4.4.2,gcc_ntoarmv7le_cpp
  72. 17:18 < Luqman> or whatever version it is
  73. 17:19 <@peter9477> Luqman: well, that doesn't help *me*, but maybe it will help HorizonXP
  74. 17:19 <@peter9477> this stuff is using CMake, so I haven't got a clue how to do whatever i'm supposed to do with it
  75. 17:21 < Luqman> oh did you get the error about qcc not being able to compile something
  76. 17:21 < canurabus> peter9477, I've built something with CMake using qcc... its a bit of a pain, but not terrible
  77. 17:22 < canurabus> you need to replace both the C and CXX compilers with qcc, pass the "-lang-c++ (or whatever it is, dont remember the exact flag)" flag to the CXX_FLAGS option
  78. 17:23 < canurabus> and manually specify the linker tool, nm tool, etc... those are all "nto*-lm", "nto*-nm" etc.
  79. 17:24 < Luqman> something like this http://codepad.org/yM9P7FvT tweak as necessary
  80. 17:25 <@peter9477> well, thanks guys, but it'll have to be HorizonXP who tries that advice out
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement