Christian, does it make sense to add construct
cpp.driverLinkerFlags: [
"-Wl,--disable-new-dtags",
]
to the project code QBS?
Or is this problem on Ubuntu only I have?
On the other hand, the people on the internet writes that RUNPATH is a
more correct approach (for example here:
https://stackoverflow.com/questions/51952784/embed-rpath-instead-of-runpath-in-when-building-shared-objects-on-ubuntu-18-04)
What do you think about this?
--
Pavel
P.S.
When QBS is builded as an independent project (outside QtC), this case
everything works even with RUNPATH. Although, perhaps there is some
"magic" with paths. In my system directly states the path to
standalone-QBS project (/etc/profile.d/qbs.sh => export
PATH=$PATH:/opt/qbs/bin)
24.10.2022 19:16, Карелин Павел пишет:
24.10.2022 17:28, Christian Kandeler via Qbs пишет:
On 10/24/22 16:15, Карелин Павел wrote:
24.10.2022 16:58, Christian Kandeler via Qbs пишет:
On 10/24/22 15:38, Карелин Павел wrote:
24.10.2022 13:48, Christian Kandeler via Qbs пишет:
On 10/24/22 12:34, Карелин Павел wrote:
I think runpath is wrong for libqbscore.so.1.23.2: instead of
'$ORIGIN/../lib/qtcreator' it should be
'$ORIGIN/../../lib/qtcreator'
Why? bin/ and lib/ are located on the same level.
Because loading the libqbsscriptengine.so.1.23 library comes from
libqbscore.so.1.23.2, not bin/qbs.
I conducted an experiment: in the libqbscore.so.1.23.2 I replaced
runpath from '$ORIGIN/..:$ORIGIN/../lib/qtcreator:/opt/qt515/lib'
to '$ORIGIN/../../lib/qtcreator:/opt/qt515/lib:/usr/bi'
And everything worked for me.
The problem seems to be differences in linker behavior. My binaries
have RPATH set, yours use RUNPATH. The former works recursively,
the latter doesn't. What linker are you using? I have binutils 2.39.
Systerm compiler from Ubuntu 20.04. GCC version 9.4.0
That doesn't answer the linker question.
binutils 2.34-6ubuntu1.3
In my qbs projects, I explicitly use RPATH instead of RUNPATH using
the following command:
cpp.driverLinkerFlags: [
"-Wl,--disable-new-dtags",
]
My man page says:
By default, the new dynamic tags are not created.
In my man it says the same thing:
man ld
--enable-new-dtags
--disable-new-dtags
This linker can create the new dynamic tags in ELF. But the
older ELF systems may not understand them. If you specify
--enable-new-dtags, the new dynamic tags will be created as needed and
older dynamic tags will be omitted. If you specify
--disable-new-dtags, no new dynamic tags will be created. By default,
the new dynamic tags are not created. Note that those options are only
available for ELF systems.
But in fact, the default uses runpath. I ran into this problem when I
switched to Ubuntu 20.04, and therefore began to use
"-Wl,--disable-new-dtags".
I rebuild QtC8 with "-Wl,--disable-new-dtags". Now QtC/QBS works fine
(the crutch is turned off, verified :)))
--
Pavel
Christian
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs
_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs