Created attachment 152279 [details] Patch to hardcode /usr/local/share/qcad into the search list cad/qcad doesn't find its "pattern" files for cross-hatching because it is not looking where we install them. The attached patch makes it find things in /usr/local/share/qcad, by hardcoding that path. I suspect is not the way we want it either, but I hope the patch can serve as inspiration for the correct fix.
Auto-assigned to maintainer mr@FreeBSD.org
I think that this bug report supersedes bug 184368, thus bug 184368 is better to close. The patch does not change anything for me on 9.3-STABLE, unfortunately. 1. To build the port, I still need first to delete the installed package. 2. The successfully installed qcad segfaults with or without the patch as following (with patch). $ qcad Debug: RDxfPlugin::init Debug: RExamplePlugin::init Debug: TransactionListenerPlugin::init Segmentation fault: 11 $ gdb qcad GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)... (gdb) r Starting program: /usr/local/bin/qcad (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New LWP 100850] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[New Thread 811007400 (LWP 100850/qcad-bin)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...Debug: RDxfPlugin::init (no debugging symbols found)...Debug: RExamplePlugin::init (no debugging symbols found)...Debug: TransactionListenerPlugin::init [New Thread 811009800 (LWP 101055/qcad-bin)] (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 811007400 (LWP 100850/qcad-bin)] 0x00000008030f4d3f in inflate_fast () from /usr/local/lib/libqcadcore.so (gdb) bt #0 0x00000008030f4d3f in inflate_fast () from /usr/local/lib/libqcadcore.so #1 0x000000080361596a in inflate () from /lib/libz.so.6 #2 0x000000080ed0ea3d in png_read_IDAT_data () from /usr/local/lib/libpng16.so.16 #3 0x000000080ed01585 in png_read_row () from /usr/local/lib/libpng16.so.16 #4 0x000000080ed02a1b in png_read_image () from /usr/local/lib/libpng16.so.16 #5 0x0000000808af0477 in QPngHandlerPrivate::readPngImage () from /usr/local/lib/qt4/libQtGui.so.4 #6 0x0000000808af0bcc in QPngHandler::read () from /usr/local/lib/qt4/libQtGui.so.4 #7 0x0000000808abacce in QImageReader::read () from /usr/local/lib/qt4/libQtGui.so.4 #8 0x0000000808abb25c in QImageReader::read () from /usr/local/lib/qt4/libQtGui.so.4 #9 0x0000000808ad0dbc in QPixmapData::fromFile () from /usr/local/lib/qt4/libQtGui.so.4 #10 0x0000000808ac911d in QPixmap::load () from /usr/local/lib/qt4/libQtGui.so.4 #11 0x0000000808acbd17 in QPixmap::QPixmap () from /usr/local/lib/qt4/libQtGui.so.4 #12 0x0000000815e61a5e in QtScriptShell_QPixmap::QtScriptShell_QPixmap () from /usr/local/share/qcad/plugins/script/libqtscript_gui.so.1.0.0 #13 0x00000008159a9791 in qtscript_QPixmap_static_call () from /usr/local/share/qcad/plugins/script/libqtscript_gui.so.1.0.0 #14 0x00000008064dc990 in QScript::FunctionWrapper::proxyConstruct () from /usr/local/lib/qt4/libQtScript.so.4 #15 0x00000008063fcb51 in QTJSC::checkSyntax () from /usr/local/lib/qt4/libQtScript.so.4 #16 0x00000008063ce958 in QTJSC::Interpreter::privateExecute () from /usr/local/lib/qt4/libQtScript.so.4 #17 0x00000008063d4cdd in QTJSC::Interpreter::execute () from /usr/local/lib/qt4/libQtScript.so.4 #18 0x00000008063d5009 in QTJSC::Interpreter::execute () from /usr/local/lib/qt4/libQtScript.so.4 #19 0x00000008064bb820 in QScriptEnginePrivate::evaluateHelper () from /usr/local/lib/qt4/libQtScript.so.4 #20 0x00000008064bc111 in QScriptEngine::evaluate () from /usr/local/lib/qt4/libQtScript.so.4 #21 0x0000000800a5ff7e in RScriptHandlerEcma::eval () from /usr/local/lib/libqcadecmaapi.so #22 0x0000000800a60a95 in RScriptHandlerEcma::doScript () from /usr/local/lib/libqcadecmaapi.so #23 0x0000000802de0986 in RScriptHandler::init () from /usr/local/lib/libqcadcore.so #24 0x00000000004046a2 in ?? () #25 0x0000000000403f91 in ?? () #26 0x0000000800622000 in ?? () #27 0x0000000000000000 in ?? () (gdb)
The coredump you are seing is due to another issue unrelated to this, see bug 187506 (diagnosis) and bug 197135 (maintainer fix). The reason you need to deinstall qcad before compiling it, is the order of -L arguments used during compilation, -L/usr/local/lib comes before its own source/build directories, so it preferentially picks up the installed libraries over the built libraries.
> The coredump you are seing is due to another issue unrelated to this, see bug > 187506 (diagnosis) and bug 197135 (maintainer fix). Interesting. I've seen bug 18506, but since I could still use qcad (only no pdf export), and now the updated qcad dies right after start, I did not connect SEGV to 18506... Thanks! > The reason you need to deinstall qcad before compiling it, is the order of -L > arguments used during compilation, -L/usr/local/lib comes before its ownsource/> build directories, so it preferentially picks up the installed libraries > over the built libraries. Right. But I do not understand why reinstalling from the same new version fails. The libs are to be the same (sans stripping), are they not?
reinstalling will by definition be a tainted build, since the -L order mandates you need to deinstall to get an untainted build. Obviously -L order should be fixed too, but that is a separate issue. If I apply the OpenNurbs fix I can print and PDF export. If I also apply this fix, I can use patterns.
A commit references this bug: Author: mr Date: Fri Jan 30 17:20:21 UTC 2015 New revision: 378174 URL: https://svnweb.freebsd.org/changeset/ports/378174 Log: Add datadir to search path. PR: 197140 Changes: head/cad/qcad/Makefile head/cad/qcad/files/patch-src_core_RS.cpp
Hi, a similar fix has been committed. Please test.
Committed fix works for me. Thanks !