Creating OSX Homebrew (Mac OS X package manager) formula
Attempting to create formula to build a stable and HEAD version of Valentina for OSX.
Comments (59)
-
reporter -
repo owner @luzpaz , this is great idea, we need update our OS X package.
-
repo owner @luzpaz , maybe you can create tutorial about creation Valentina package for OS X? I already have written two: How create Windows installer, How create debian package.
-
reporter after your update of the code still getting these errors: https://gist.github.com/luzpaz/44c391beab770bc3e47c
-
repo owner Try now.
-
reporter -
repo owner Ok, it is because objcopy don't exist for mac. I will fix this.
-
repo owner -
repo owner If you can't install objcopy i can disable debug symbols on Mac.
-
reporter objcopy on OSX is called gobjcopy
aliases in .bash_profile are not honored in homebrew
so is it possible to specify that if Valentina is being built on OSX via homebrew to use gobjcopy ? -
repo owner I think yes.
-
repo owner I made changes.
-
reporter /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -Wall -W -fPIC -DQMUPARSER_LIBRARY -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_CORE_LIB -I/usr/local/Cellar/qt5/5.3.2/mkspecs/macx-clang -I. -I/usr/local/Cellar/qt5/5.3.2/lib/QtCore.framework/Versions/5/Headers -Imoc -F/usr/local/Cellar/qt5/5.3.2/lib -o obj/stable.o stable.cpp qmuparsertest.cpp:648:33: error: use of undeclared identifier 'M_PI' iStat += EqnTest ( "-_pi", -M_PI, true ); ^ qmuparsertest.cpp:1182:14: error: use of undeclared identifier 'fabs' if ( fabs ( a_fRes1 - fVal[0] ) > 0.0000000001 ) ^ qmuparsertest.cpp:1187:14: error: use of undeclared identifier 'fabs' if ( fabs ( a_fRes2 - fVal[1] ) > 0.0000000001 ) ^ qmuparsertest.cpp:1234:43: error: use of undeclared identifier 'M_PI' p1->DefineConst ( "pi", ( qreal ) M_PI ); ^ qmuparsertest.cpp:1235:42: error: use of undeclared identifier 'M_E' p1->DefineConst ( "e", ( qreal ) M_E ); ^ qmuparsertest.cpp:1345:31: error: use of undeclared identifier 'fabs' bCloseEnough &= ( fabs ( a_fRes - fVal[i] ) <= fabs ( fVal[i] * 0.00001 ) ); ^ qmuparsertest.cpp:1345:60: error: use of undeclared identifier 'fabs' bCloseEnough &= ( fabs ( a_fRes - fVal[i] ) <= fabs ( fVal[i] * 0.00001 ) ); ^ qmuparsertest.cpp:1359:49: error: use of undeclared identifier 'fabs' bCloseEnough &= (qFuzzyCompare( fabs ( fVal[i] ), std::numeric_limits<qreal>::infinity())==false ); ^ 8 errors generated. make[3]: *** [obj/qmuparsertest.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [sub-qmuparser-make_first-ordered] Error 2 make[1]: *** [sub-libs-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
-
repo owner Fixed.
-
reporter New error:
gobjcopy --only-keep-debug bin//libqmuparser.2.2.4.dylib bin//libqmuparser.2.2.4.dylib.debug && strip --strip-debug --strip-unneeded bin//libqmuparser.2.2.4.dylib && gobjcopy --add-gnu-debuglink bin//libqmuparser.2.2.4.dylib.debug bin//libqmuparser.2.2.4.dylib error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: unrecognized option: --strip-debug Usage: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...] make[3]: *** [bin/libqmuparser.2.2.4.dylib] Error 1 make[2]: *** [sub-qmuparser-make_first-ordered] Error 2 make[1]: *** [sub-libs-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
-
repo owner I am not sure about last commits. Sorry about this.
-
reporter In the strip man page there is the -S flag:
-S Remove the debugging symbol table entries (those created by the -g option to cc(1) and other compilers).
Is this the same as --strip-debug ?
-
repo owner Maybe.
Form strip man:
When strip is used with no options on an executable file, it checks that file to see if it uses the dynamic link editor. If it does, the effect of the strip command is the same as using the -u and -r options. If the file does not use the dynamic link editor, the effect of strip without any options is the same as using the -s option of ld(1). The options -S, -x, and -X have the same effect as the ld(1) options. The options to strip(1) can be com- bined to trim the symbol table to just what is desired.
I mean better don't use any option and give strip decide what to do. -
reporter I mean better don't use any option and give strip decide what to do.
A-OK. let me know when you've made the commit to remove --strip-debug
-
repo owner Already did. :)
-
reporter New error:
gobjcopy --only-keep-debug bin/libqmuparser.2.2.4.dylib bin/libqmuparser.2.2.4.dylib.debug && strip bin/libqmuparser.2.2.4.dylib && gobjcopy --add-gnu-debuglink bin/libqmuparser.2.2.4.dylib.debug bin/libqmuparser.2.2.4.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: symbols referenced by indirect symbol table entries that can't be stripped in: /private/tmp/Valentina-lfESeC/dismine-valentina-f1b54a708543/src/libs/qmuparser/bin/libqmuparser.2.2.4.dylib __Z17qt_message_output9QtMsgTypeRK18QMessageLogContextRK7QString __Z9qBadAllocv __ZN10QArrayData10deallocateEPS_mm __ZN10QArrayData8allocateEmmm6QFlagsINS_16AllocationOptionEE __ZN11QTextStreamC1EP7QString6QFlagsIN9QIODevice12OpenModeFlagEE __ZN11QTextStreamD1Ev __ZN11QTextStreamlsEPKc __ZN11QTextStreamlsERK7QString __ZN11QTextStreamlsEc __ZN11QTextStreamlsEd __ZN11QTextStreamlsEi __ZN11QTextStreamlsEm __ZN12QMapDataBase10createDataEv __ZN12QMapDataBase10createNodeEiiP12QMapNodeBaseb __ZN12QMapDataBase18recalcMostLeftNodeEv __ZN12QMapDataBase8freeDataEPS_ __ZN12QMapDataBase8freeTreeEP12QMapNodeBasei __ZN7QString11reallocDataEjb __ZN7QString13toUcs4_helperEPKtiPj __ZN7QString15fromUtf8_helperEPKci __ZN7QString16fromAscii_helperEPKci __ZN7QString4chopEi __ZN7QString6appendERKS_ __ZN7QString6expandEi __ZN7QString6setNumExi __ZN7QString7replaceERKS_S1_N2Qt15CaseSensitivityE __ZN7QString7replaceEiiRKS_ __ZN7QString8fromUcs4EPKji __ZN7QStringaSERKS_ __ZN9QListData11detach_growEPii __ZN9QListData6appendEv __ZN9QListData6detachEi __ZN9QListData7disposeEPNS_4DataE __ZNK14QMessageLogger7warningEv __ZNK7QString3midEii __ZNK7QString5toIntEPbi __ZNK7QString7indexOfERKS_iN2Qt15CaseSensitivityE __ZNK7QString8endsWithE5QCharN2Qt15CaseSensitivityE __ZNK7QString8toDoubleEPb __ZeqRK7QStringS1_ __ZltRK7QStringS1_ __ZNKSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE2atEm __ZNKSt3__121__basic_string_commonILb1EE20__throw_length_errorEv __ZNKSt3__16locale9use_facetERNS0_2idE __ZNKSt3__18ios_base6getlocEv __ZNSt13runtime_errorC1EPKc __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc __ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6resizeEmw __ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE9push_backEw __ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEED1Ev __ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEEaSERKS5_ __ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5seekgENS_4fposI11__mbstate_tEE __ZNSt3__113basic_istreamIwNS_11char_traitsIwEEE5tellgEv __ZNSt3__113basic_istreamIwNS_11char_traitsIwEEED2Ev __ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERd __ZNSt3__113basic_istreamIwNS_11char_traitsIwEEErsERj __ZNSt3__113basic_ostreamIwNS_11char_traitsIwEEED2Ev __ZNSt3__115basic_streambufIwNS_11char_traitsIwEEEC2Ev __ZNSt3__115basic_streambufIwNS_11char_traitsIwEEED2Ev __ZNSt3__16locale14__install_ctorERKS0_PNS0_5facetEl __ZNSt3__16locale2id5__getEv __ZNSt3__16locale7classicEv __ZNSt3__16localeC1EPKc __ZNSt3__16localeC1ERKS0_ __ZNSt3__16localeC1Ev __ZNSt3__16localeD1Ev __ZNSt3__16localeaSERKS0_ __ZNSt3__18ios_base4initEPv __ZNSt3__18ios_base5imbueERKNS_6localeE __ZNSt3__18numpunctIwEC2Em __ZNSt3__18numpunctIwED2Ev __ZNSt3__19basic_iosIwNS_11char_traitsIwEEED2Ev __ZNSt9exceptionD2Ev __ZSt9terminatev __ZdlPv __Znwm ___cxa_allocate_exception ___cxa_begin_catch ___cxa_end_catch ___cxa_free_exception ___cxa_rethrow ___cxa_throw __Unwind_Resume ___assert_rtn ___bzero ___cxa_atexit ___stack_chk_fail _acos _asin _atan _atan2 _cos _cosh _exit _exp _floor _getchar _log _log10 _memcpy _pow _sin _sinh _strlen _tan _tanh _wmemchr __ZN10QArrayData11shared_nullE __ZN12QMapDataBase11shared_nullE __ZN9QListData11shared_nullE __ZNSt13runtime_errorD1Ev __ZNSt3__18numpunctIwE2idE __ZTISt13runtime_error __ZTISt9bad_alloc __ZTISt9exception __ZTIb ___gxx_personality_v0 ___stack_chk_guard dyld_stub_binder make[3]: *** [bin/libqmuparser.2.2.4.dylib] Error 1 make[2]: *** [sub-qmuparser-make_first-ordered] Error 2 make[1]: *** [sub-libs-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
-
repo owner -
reporter /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7 -Wall -W -fPIE -DQT_NO_DEBUG_OUTPUT -DLOC_REV=0 -DDATADIR=\"/usr/local/Cellar/Valentina/HEAD/share\" -DPKGDATADIR=\"\" -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_SVG_LIB -DQT_XMLPATTERNS_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/local/Cellar/qt5/5.3.2/mkspecs/macx-clang -I. -Iwidgets -I../libs/qmuparser -I../libs/vpropertyexplorer -I/usr/local/Cellar/qt5/5.3.2/lib/QtPrintSupport.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtSvg.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtXmlPatterns.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtWidgets.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtNetwork.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtXml.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtGui.framework/Versions/5/Headers -I/usr/local/Cellar/qt5/5.3.2/lib/QtCore.framework/Versions/5/Headers -Imoc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers -Iuic -F/usr/local/Cellar/qt5/5.3.2/lib -o obj/varc.o geometry/varc.cpp geometry/vdetail.cpp:97:23: error: out-of-line definition of 'operator[]' does not match any declaration in 'VDetail' VNodeDetail &VDetail::operator [](int indx) ^~~~~~~~ geometry/vdetail.cpp:103:29: error: out-of-line definition of 'at' does not match any declaration in 'VDetail' const VNodeDetail &VDetail::at(int indx) const ^~ geometry/vdetail.cpp:109:14: error: return type of out-of-line definition of 'VDetail::indexOfNode' differs from that in the declaration int VDetail::indexOfNode(const quint32 &id) const ^ geometry/vdetail.h:178:20: note: previous declaration is here ptrdiff_t indexOfNode(const quint32 &id) const; ^ geometry/vdetail.cpp:165:14: error: return type of out-of-line definition of 'VDetail::Edge' differs from that in the declaration int VDetail::Edge(const quint32 &p1, const quint32 &p2) const ^ geometry/vdetail.h:204:20: note: previous declaration is here ptrdiff_t Edge(const quint32 &p1, const quint32 &p2)const; ^ 4 errors generated. make[2]: *** [obj/vdetail.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [sub-app-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
-
reporter /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -stdlib=libc++ -mmacosx-version-min=10.7 -o bin/valentina.app/Contents/MacOS/valentina obj/vcontainer.o obj/calculator.o obj/vmeasurement.o obj/vincrement.o obj/vvariable.o obj/vinternalvariable.o obj/vlineangle.o obj/varclength.o obj/vcurvelength.o obj/vlinelength.o obj/vsplinelength.o obj/vformula.o obj/dialogtriangle.o obj/dialogtool.o obj/dialogsplinepath.o obj/dialogspline.o obj/dialogsinglepoint.o obj/dialogshoulderpoint.o obj/dialogpointofintersection.o obj/dialogpointofcontact.o obj/dialognormal.o obj/dialoglineintersect.o obj/dialogline.o obj/dialogheight.o obj/dialogendline.o obj/dialogdetail.o obj/dialogbisector.o obj/dialogarc.o obj/dialogalongline.o obj/dialogcutspline.o obj/dialogcutsplinepath.o obj/dialoguniondetails.o obj/dialogcutarc.o obj/dialogincrements.o obj/dialoghistory.o obj/configdialog.o obj/dialogpatternproperties.o obj/dialogmeasurements.o obj/dialogstandardmeasurements.o obj/dialogindividualmeasurements.o obj/dialogaboutapp.o obj/dialogpatternxmledit.o obj/dialogeditwrongformula.o obj/configurationpage.o obj/patternpage.o obj/communitypage.o obj/pathpage.o obj/dialogundo.o obj/vexceptionobjecterror.o obj/vexceptionemptyparameter.o obj/vexceptionconversionerror.o obj/vexceptionbadid.o obj/vexception.o obj/vexceptionwrongid.o obj/vexceptionundo.o obj/vsplinepoint.o obj/vsplinepath.o obj/vspline.o obj/vnodedetail.o obj/vdetail.o obj/varc.o obj/vgobject.o obj/vpointf.o obj/vequidistant.o obj/vabstractcurve.o obj/vtooldetail.o obj/vdatatool.o obj/vabstracttool.o obj/vtooltriangle.o obj/vtoolsplinepath.o obj/vtoolspline.o obj/vtoolsinglepoint.o obj/vtoolshoulderpoint.o obj/vtoolpointofintersection.o obj/vtoolpointofcontact.o obj/vtoolpoint.o obj/vtoolnormal.o obj/vtoollinepoint.o obj/vtoollineintersect.o obj/vtoolline.o obj/vtoolheight.o obj/vtoolendline.o obj/vtoolbisector.o obj/vtoolarc.o obj/vtoolalongline.o obj/vdrawtool.o obj/vnodesplinepath.o obj/vnodespline.o obj/vnodepoint.o obj/vnodearc.o obj/vabstractnode.o obj/vtoolcutspline.o obj/vtoolcutsplinepath.o obj/vtooluniondetails.o obj/vtoolcutarc.o obj/vabstractspline.o obj/vtoolcut.o obj/vtablegraphicsview.o obj/vmaingraphicsview.o obj/vmaingraphicsscene.o obj/vitem.o obj/doubledelegate.o obj/textdelegate.o obj/vtooloptionspropertybrowser.o obj/vformulapropertyeditor.o obj/vformulaproperty.o obj/vtoolrecord.o obj/vdomdocument.o obj/vpattern.o obj/vstandardmeasurements.o obj/vindividualmeasurements.o obj/vabstractmeasurements.o obj/addtocalc.o obj/addpatternpiece.o obj/movespoint.o obj/movespline.o obj/movesplinepath.o obj/savetooloptions.o obj/savedetailoptions.o obj/movedetail.o obj/deltool.o obj/deletepatternpiece.o obj/adddetnode.o obj/adddet.o obj/adduniondetails.o obj/deletedetail.o obj/vundocommand.o obj/renamepp.o obj/vgraphicssimpletextitem.o obj/vcontrolpointspline.o obj/vsimplecurve.o obj/visline.o obj/vistoolline.o obj/vistoolendline.o obj/vistoolalongline.o obj/vistoolbisector.o obj/vistoolshoulderpoint.o obj/vistoolnormal.o obj/vistoolheight.o obj/vistoolpointofintersection.o obj/vistooltriangle.o obj/vistoolpointofcontact.o obj/vistoollineintersect.o obj/visualization.o obj/vistoolarc.o obj/vispath.o obj/vistoolcutarc.o obj/vistoolspline.o obj/vistoolcutspline.o obj/vistoolsplinepath.o obj/vistoolcutsplinepath.o obj/vapplication.o obj/vtranslation.o obj/undoevent.o obj/qcommandlineoption.o obj/qcommandlineparser.o obj/main.o obj/mainwindow.o obj/tablewindow.o obj/stable.o obj/version.o obj/options.o obj/qrc_icon.o obj/qrc_cursor.o obj/qrc_theme.o obj/qrc_schema.o obj/qrc_measurements.o obj/moc_dialogtriangle.o obj/moc_dialogtool.o obj/moc_dialogsplinepath.o obj/moc_dialogspline.o obj/moc_dialogsinglepoint.o obj/moc_dialogshoulderpoint.o obj/moc_dialogpointofintersection.o obj/moc_dialogpointofcontact.o obj/moc_dialognormal.o obj/moc_dialoglineintersect.o obj/moc_dialogline.o obj/moc_dialogheight.o obj/moc_dialogendline.o obj/moc_dialogdetail.o obj/moc_dialogbisector.o obj/moc_dialogarc.o obj/moc_dialogalongline.o obj/moc_dialogcutspline.o obj/moc_dialogcutsplinepath.o obj/moc_dialoguniondetails.o obj/moc_dialogcutarc.o obj/moc_dialogincrements.o obj/moc_dialoghistory.o obj/moc_configdialog.o obj/moc_dialogpatternproperties.o obj/moc_dialogmeasurements.o obj/moc_dialogstandardmeasurements.o obj/moc_dialogindividualmeasurements.o obj/moc_dialogaboutapp.o obj/moc_dialogeditwrongformula.o obj/moc_dialogpatternxmledit.o obj/moc_configurationpage.o obj/moc_patternpage.o obj/moc_communitypage.o obj/moc_pathpage.o obj/moc_dialogundo.o obj/moc_vtooldetail.o obj/moc_vdatatool.o obj/moc_vabstracttool.o obj/moc_vtooltriangle.o obj/moc_vtoolsplinepath.o obj/moc_vtoolspline.o obj/moc_vtoolsinglepoint.o obj/moc_vtoolshoulderpoint.o obj/moc_vtoolpointofintersection.o obj/moc_vtoolpointofcontact.o obj/moc_vtoolpoint.o obj/moc_vtoolnormal.o obj/moc_vtoollinepoint.o obj/moc_vtoollineintersect.o obj/moc_vtoolline.o obj/moc_vtoolheight.o obj/moc_vtoolendline.o obj/moc_vtoolbisector.o obj/moc_vtoolarc.o obj/moc_vtoolalongline.o obj/moc_vdrawtool.o obj/moc_vnodesplinepath.o obj/moc_vnodespline.o obj/moc_vnodepoint.o obj/moc_vnodearc.o obj/moc_vabstractnode.o obj/moc_vtoolcutspline.o obj/moc_vtoolcutsplinepath.o obj/moc_vtooluniondetails.o obj/moc_vtoolcutarc.o obj/moc_vabstractspline.o obj/moc_vtoolcut.o obj/moc_vtablegraphicsview.o obj/moc_vmaingraphicsview.o obj/moc_vmaingraphicsscene.o obj/moc_vitem.o obj/moc_doubledelegate.o obj/moc_textdelegate.o obj/moc_vtooloptionspropertybrowser.o obj/moc_vformulapropertyeditor.o obj/moc_vpattern.o obj/moc_addtocalc.o obj/moc_addpatternpiece.o obj/moc_movespoint.o obj/moc_movespline.o obj/moc_movesplinepath.o obj/moc_savetooloptions.o obj/moc_savedetailoptions.o obj/moc_movedetail.o obj/moc_deltool.o obj/moc_deletepatternpiece.o obj/moc_adddetnode.o obj/moc_adddet.o obj/moc_adduniondetails.o obj/moc_deletedetail.o obj/moc_vundocommand.o obj/moc_renamepp.o obj/moc_vgraphicssimpletextitem.o obj/moc_vcontrolpointspline.o obj/moc_vsimplecurve.o obj/moc_visline.o obj/moc_vistoolline.o obj/moc_vistoolendline.o obj/moc_vistoolalongline.o obj/moc_vistoolbisector.o obj/moc_vistoolshoulderpoint.o obj/moc_vistoolnormal.o obj/moc_vistoolheight.o obj/moc_vistoolpointofintersection.o obj/moc_vistooltriangle.o obj/moc_vistoolpointofcontact.o obj/moc_vistoollineintersect.o obj/moc_visualization.o obj/moc_vistoolarc.o obj/moc_vispath.o obj/moc_vistoolcutarc.o obj/moc_vistoolspline.o obj/moc_vistoolcutspline.o obj/moc_vistoolsplinepath.o obj/moc_vistoolcutsplinepath.o obj/moc_vapplication.o obj/moc_mainwindow.o obj/moc_tablewindow.o -F/usr/local/Cellar/qt5/5.3.2/lib -L/private/tmp/Valentina-TLpcnx/dismine-valentina-5ae5a239d2af/src/app/../libs/qmuparser/bin -lqmuparser -L/private/tmp/Valentina-TLpcnx/dismine-valentina-5ae5a239d2af/src/app/../libs/vpropertyexplorer/bin -lvpropertyexplorer -framework QtPrintSupport -framework QtWidgets -framework QtGui -framework QtCore -framework QtSvg -framework QtXmlPatterns -framework QtNetwork -framework QtXml -framework OpenGL -framework AGL ld: dylib /private/tmp/Valentina-TLpcnx/dismine-valentina-5ae5a239d2af/src/libs/vpropertyexplorer/bin/libvpropertyexplorer.dylib missing LC_ID_DYLIB load command file '/private/tmp/Valentina-TLpcnx/dismine-valentina-5ae5a239d2af/src/libs/vpropertyexplorer/bin/libvpropertyexplorer.dylib' for architecture x86_64 clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation) make[2]: *** [bin/valentina.app/Contents/MacOS/valentina] Error 254 make[1]: *** [sub-app-make_first-ordered] Error 2 make: *** [sub-src-make_first] Error 2
-
reporter re: (Commit 2441e38) Disable compile with debug information on mac.
weren't we close ? IMO, it would be good to have debug symbols in mac build as an option so it can help devs fix issues on OSX builds of Valentina in the future...no ?
-
repo owner Why did i add debug symbols? Because many people who compile program from sources want debug in "release" mode. For common user it is not useful. You can easy get debug symbols if compile with command qmake -r CONFIG+=debug. Because we want share this binary better strip debug symbols in separate file (*.debug) and link to debugger like i did in linux. I will return debug symbols if only someone will find correct command for strip and store debug symbols on mac.
-
reporter Should this go in to /usr/local/lib ?
That where much of the Homebrew libs are IIUC -
repo owner I think you need to set correct prefix for make install.
Default is /usr:unix { #VARIABLES isEmpty(PREFIX) { PREFIX = /usr }
-
repo owner Example from the our debian package qmake PREFIX=/usr ../$(APPNAME).pro -r.
-
reporter Which prefix should I use per: https://github.com/Homebrew/homebrew/wiki/Formula-Cookbook#variables-for-directory-locations ?
And should I pass it via the make install line ? -
repo owner I think default (HOMEBREW_PREFIX) or prefix (#{HOMEBREW_PREFIX}/Cellar/#{name}/#{version}).
We already have this:
def install args = %W[ -r PREFIX=#{prefix} ] system "qmake", "./", *args
This code should work.
-
reporter Not sure. Will ask on #machomebrew on Freenode IRC
-
reporter "Looking at the .pro files, it seems the path may be hardcoded and I don't know how you'd override it." -- dev over in #machomebrew about harcoded linking PREFIX to /usr as per your comment in https://bitbucket.org/dismine/valentina/issue/166/creating-osx-homebrew-mac-os-x-package#comment-12785543
Can we make is so that PREFIX can be changed by a flag?
EDIT: So as to avoid: https://gist.github.com/luzpaz/9389af8d43bba45358f3 -
repo owner Yes, we can. I already showed you example. qmake PREFIX=/usr/local ../$(APPNAME).pro -r.
-
reporter "From your build logs, given that part of the contents were installed into the provided prefix and others aren't, my guess would be that part of the build process respects the passed PREFIX and other parts dont" -homebrew dev
-
reporter mistym: Looking at the .pro/.pri files, I notice that src/app/app.pr{i,o} references PREFIX and builds paths relative to there mistym: But the libs in qmuparser and vpropertyexplorer don't reference PREFIX at all and just specify /usr/lib directly mistym: Incidentally, those two libs are the ones it tried to install into the wrong places.
-
repo owner Yes, answer is correct. Because where install libraries and binary choose qmake directly. I will try find way to change prefix for qmake too.
-
reporter Slowly we're making Valentina bullet proof :)
-
repo owner Sorry, now i can't make change to code because i am in Berlin. In Tuesday i will return to home and we will continue developing.
-
reporter hey Roman I have some time right now
-
repo owner Ok, wait i will make change. Because i am sick i did not plan work today.
-
repo owner Ok, try now.
-
reporter Ok the build process and install complete. Looks like there is some harcoded linking going on: https://gist.github.com/luzpaz/02ad5897a775b3e70e24#file-gistfile1-txt-L35-L41
When I try to open it, it crashes hard
dyld: Library not loaded: libqmuparser.2.dylib Referenced from: /usr/local/Cellar/Valentina/HEAD/valentina.app/Contents/MacOS/valentina Reason: image not found Trace/BPT trap: 5 logout
From machomebrew:
Looks like the install names are bad: it's not referencing the full path, just the short name of the libraries. libqmuparser.2.dylib and libvpropertyexplorer.1.dylib are referred to only by their filenames names, not by their full paths
-
reporter Ok.. the libs are in the wrong place https://gist.githubusercontent.com/luzpaz/40d5ae511531b24118af/raw/539865a1f8d1b60ae28d4c8d809df796cfe69353/gistfile1.txt
We're figuring it out
-
reporter Bingo! OK .. some follow up fixes:
`brew ls -v valentina` output: https://gist.githubusercontent.com/luzpaz/9febca8295521a9a5838/raw/a969d1d5b9617b1a9e0c0acac79c54fdafc22be5/gistfile1.txt mistym:Only problem I see is that valentina.app is in bin/ now Kunda: instead of just PREFIX mistym: Yeah mistym: (Actually, it's also weird that valentina.app doesn't contain all of the app's contents) mistym: It's kind of half an app bundle, half a Unix-style layout Kunda: what does a complete app bundle look like ? mistym: A complete app bundle is self-contained: all of its contents are within the .app. So the libraries, the stuff from share, etc. live inside the .app
-
repo owner Ok, so you don't want to see valentina.app in bin/?
-
reporter i gotta go. Continue later. Feel better Roman!
-
repo owner Good, thanks. I will try find way to insert all files in bundle.
-
repo owner I think we should use on the last stage (after make) something like this macdeployqt yourappname.app -dmg. Or even replace make install with macdeployqt.
-
reporter I don't know. Is macdeployqt used to bundle packages for deplyoment. Can we use macdeployqt it in a homebrew formula or in another script? If we're making something to submit to Homebrew as a valid formula I doubt that they'd would allow it. I'm assuming all this.
In my mind I'd like to have the homebrew formula have the following compiling options: stable devel HEAD
If we're going to package then using macdelployqt it would be in a separate script.
-
repo owner If so i don't see another way to create a bundle.
-
repo owner "I gave up on QMAKE_BUNDLE_DATA, from what I can tell it doesn't work for app_bundle targets. Instead I'm using INSTALLS and make install to generate the app bundle then triggering a call to macdeployqt to finish things off. It isn't ideal, but it does the trick."
-
repo owner I am not sure but maybe we should add CONFIG += app_bundle to .pro files.
-
repo owner I will try use QMAKE_BUNDLE_DATA for mac instead make install.
-
reporter sweet
-
repo owner So, i see that without access to Mac Os i can't do much. If we want create bundle we need to change qmake script. But without experiments it is very hard for me. Also we have several paths in program that need to check on Mac after run from bundle. Another part it is repository history. I don't want see all this experiments in repository. We should find someone who can make for us this job on Mac.
-
repo owner @luzpaz, we made some progress. See last pull request.
-
reporter Let me check...and get back to you
-
repo owner - changed status to resolved
The homebrew HEAD formula works for OSX 10.9.5 Qt 5.3.2 (haven't tested it on 10.10 yet)
- Log in to comment
Progress so far: https://gist.github.com/luzpaz/e2a285ec6db4ce0bab33