release plugin built in debug mode?

Use this forum for all posts and questions about the free QCAD Community Edition version 3

Moderator: andrew

Post Reply
jdbaker
Registered Member
Posts: 2
Joined: Tue Nov 12, 2019 5:51 pm

release plugin built in debug mode?

Post by jdbaker » Tue Nov 12, 2019 6:12 pm

I'm using NetBSD and its pkgsrc system to build qcad 3.23.0.0 from source.
The resulting executable cannot read/import DXF drawing files, saying that
no suitable importer could be found.

On the terminal where I launched 'qcad', the message:

RPluginLoader.cpp:68, static QStringList RPluginLoader::getPluginFiles():
10:07:55: Debug: Ignoring release plugin built in debug mode: "libqcaddxf.so"

repeats numerous times.

The build log shows that the following libraries:

src/3rdparty/dxflib/libdxflib.so
src/core/libqcadcore.so
src/entity/libqcadentity.so
src/operations/libqcadoperations.so

are first built in release mode, then deleted and built in debug mode.
When they are linked into "libqcaddxf.so", it causes the plugin loader to
reject it with the message shown above.

I've hacked around it by changing the respective "Makefile.Debug" files
to rename the debug-mode libraries to not clash with the release-mode names.

Perhaps there's something missing that the pkgsrc framework should pass
to guarantee building the release mode versions of these libraries only?

Has anyone else built qcad 3.23.0.0 from source and had this happen (regardless
of build system/platform)?

Thanks.

John D. Baker

Matfie
Active Member
Posts: 37
Joined: Tue Aug 30, 2016 8:46 am

Re: release plugin built in debug mode?

Post by Matfie » Fri Dec 06, 2019 7:42 pm

Yes, it should not build with debug enabled in pkgsrc and I have a fix pending for that (your message reached me via other means but I've been unable to look at it for a couple of weeks). I don't know if this is related to the Qt4->Qt5 update but essentially, just remove the "debug_and_release" keyword from the CONFIG in shared.pri and the package just builds release again.

jdbaker
Registered Member
Posts: 2
Joined: Tue Nov 12, 2019 5:51 pm

Re: release plugin built in debug mode?

Post by jdbaker » Sat Dec 07, 2019 6:09 pm

Turns out the default BUILD_TARGET for pkgsrc is "all" which caused it to build both
release and debug sub-targets. (This also caused the resulting package to be huge.)

Setting "BUILD_TARGET=release" in the pkgsrc Makefile caused it to build just the
release-mode versions of everything, so everything links properly and works as
expected. Also shrinks the package size by over a factor of 10.

Thanks to Iain Hibbert <[email protected]> for taking a look at this and figuring
out the right incantation.

Post Reply

Return to “QCAD Community Edition”