← Back to team overview

kicad-developers team mailing list archive

Re: [kicad-users] Recent builds on OSX working?

 

Bernard,

If you *don't* succeed, would you mind posting back here anyway?

Thanks!

Adam Wolf
W&L, LLC


On Sat, May 24, 2014 at 9:44 AM, Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx
> wrote:

> Hi Dick (and others),
>
> thanks for the hint, I will try not to use static linking.
> I did that because in the past dynamic linking didn’t produce portable
> applications.
> That is, they contained a reference to the wxWidgets libs at the place
> when being built and haven’t been copied to the app bundle… and all the
> usual fix-scripts to copy those libs into the bundle failed for me
> (problems with the symlinks)… and I didn’t want to fix every path manually.
>
> I looked around a bit and found some cmake modules that should be able to
> produce portable application bundles… I’ll try to add/change that in the
> cmake files… if I succeed, I will of course propose a patch.
>
>
> Thanks,
> Bernhard
>
> On 24.05.2014, at 04:16, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
>
> On 05/23/2014 12:31 PM, Jean-Paul Louis wrote:
>
> Hi Bernhard,
>
> I am attaching my script to this email.
> Some of the stuff in the script might not be needed anymore, but I will
> clean it up when I have time.
>
> After the “make” is finished, I skip the “make install” as it is not yet
> capable to work.
> So I just copy the bundles (*.app) to "/Applications/kicad” (see towards
> the end of the script).
>
> Thanks to the help of Marco, Adam and even more so from Dick of the
> development team, I simplified the script so it build to 100%, and Dick
> modified the Cmake files to create the bundles with the kiface files
> properly copied where they belongs.
> That might by why we have duplicate kiface files (seems to be the cause of
> the error at the end of the “make”.
>
> I will create the files for the ENV variables, and let you know how that
> works.
>
> Regards,
> Jean-Paul
>
>
> On May 23, 2014, at 10:59 AM, Bernhard Stegmaier stegmaier@xxxxxxxxxxxxx[kicad-users] <
> kicad-users@xxxxxxxxxxxxxxx> wrote:
>
> Hi Jean-Paul,
>
>
> can you tell me what files have to be copied where?
> I remember some discussions about copying/linking/whatever .kiface files
> that on the dev-list, but I didn’t find anything on first glance.
> And yes, let’s try to fix this…
>
> With respect to setting the environment variables I did the following:
> Using Linux-like ~/.profile, etc. files will set the variables only when
> launching from command-line… not from the dock/launcher.
> To set a variable for the launcher I made in
> ~/Library/LaunchAgents
> files named like
> local.kicad.kisys3dmod.plist
> which looks like
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
>    "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
> <plist version="1.0">
> <dict>
>    <key>Label</key>
>    <string>local.kicad.kisys3dmod</string>
>    <key>EnableGlobbing</key>
>    <true/>
>    <key>ProgramArguments</key>
>    <array>
>        <string>launchctl</string>
>        <string>setenv</string>
>        <string>KISYS3DMOD</string>
>        <string>~/10 - Projekte/KiCad/Modules</string>
>    </array>
>    <key>RunAtLoad</key>
>    <true/>
> </dict>
> </plist>
> and in the case sets KISYS3DMOD variable. I did the same for the other
> variables I need (I didn’t find any solution to set more than one variable
> in a single file). The files will be loaded automatically on login (as far
> as I remember) or you can test them with “launchctl load …”.
> But caution: those files will only set it for the launcher, not the shell…
> while searching for that I found some shell scripting that can be added to
> e.g., .profile reading the values from launched so that you don’t have to
> maintain it in two places if you need that, but I didn’t need it so I don’t
> have a link at hand.
>
> This solution works well for me both on 10.8 and 10.9.
>
> The KiCadOSXBuilder creates a wrapper-script for setting the variables,
> but I didn’t like that approach, because for me those variables are
> machine-specific (especially the library stuff).
> So, it shouldn’t be hardcoded somewhere in the application bundle, but
> defined by the machine/account itself.
>
>
> Regards,
> Bernhard
>
> On 23.05.2014, at 16:27, Jean-Paul Louis louijp@xxxxxxxxx [kicad-users] <
> kicad-users@xxxxxxxxxxxxxxx> wrote:
>
> Hi Bernhard,
>
> I use OS X 10.9.2 and I keep trying the most recents BZR. I came to the
> same conclusion about some failures due to duplicate work copying files
> into the OS X bundles.
>
> I use a bash script fairly raw to copy the files from the build to the
> /Applications/kicad directory.
> eeschema sort of work, but cannot find kicad.pro template.
> it does complain about a missing power lib twice, then load the project I
> am working on as a test case.
> When I go to the preferences, nothing is loaded there, except a power lib
> (the missing one) that I do not use, and a weird path like /usr/local/share.
>
> My next task is to figure out how to set the proper shell variables like
> KISYSMOD, KIGITHUB, etc..
> because they are not set at all in my build.
>
> If you are interested, we can work together to fix what we can, as I do
> not get any help from Marco Serantoni who is supposed to be the Mac OS X
> guru.
>
> Regards,
> Jean-Paul
> AC9GH
>
> On May 23, 2014, at 7:24 AM, Bernhard Stegmaier stegmaier@xxxxxxxxxxxxx[kicad-users] <
> kicad-users@xxxxxxxxxxxxxxx> wrote:
>
> Hi Mac guys,
>
>
> did anyone succeed to build and run a recent version on OSX (most likely
> after the modular kicad changes)?
>
> I tried to build some versions on both 10.8 and 10.9 machines using
> different versions of XCode during the last 2 weeks, but I didn’t succeed…
> :(
> Compilation did work smoothly on all machines (configured with
> -DKICAD_BUILD_STATIC=ON and having disabled scripting and github plugin -
> just as I did with all the previous versions I have built) after a small
> patch of aMakefile (see end of the mail, I think this is just a leftover
> because the file that should be copied by that piece of code is already at
> the right spot…).
> But, all binaries (except kicad) don’t work on any of my machines.
>
> They start and immediately crash with a backtrace like this:
> <<<
> Exception Type:  EXC_CRASH (SIGABRT)
> Exception Codes: 0x0000000000000000, 0x0000000000000000
>
> Application Specific Information:
> abort() called
> *** error for object 0x108e2c0f0: pointer being freed was not allocated
>
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   libsystem_kernel.dylib         0x00007fff8ae51866 __pthread_kill + 10
> 1   libsystem_pthread.dylib        0x00007fff8dbd435c pthread_kill + 92
> 2   libsystem_c.dylib              0x00007fff8e2c8b1a abort + 125
> 3   libsystem_malloc.dylib         0x00007fff91e2b07f free + 411
> 4   org.kicad-eda.pcbnew           0x0000000100008c3e
> wxScopedCharTypeBuffer<char>::DecRef() + 62
> 5   org.kicad-eda.pcbnew           0x00000001000bbff7
> wxScopedCharTypeBuffer<char>::MakeOwnedCopyOf(wxScopedCharTypeBuffer<char>
> const&) + 31
> 6   _pcbnew.kiface                 0x00000001082f2275
> wxMessageOutputStderr::Output(wxString const&) + 97
> 7   _pcbnew.kiface                 0x00000001081ef968
> ShowAssertDialog(wxString const&, int, wxString const&, wxString const&,
> wxString const&, wxAppTraits*) + 664
> 8   _pcbnew.kiface                 0x00000001081ee6cc
> wxDefaultAssertHandler(wxString const&, int, wxString const&, wxString
> const&, wxString const&) + 188
> 9   _pcbnew.kiface                 0x00000001081eec5f wxOnAssert(char
> const*, int, char const*, char const*, wchar_t const*) + 127
> 10  _pcbnew.kiface                 0x0000000108278d60
> wxStandardPathsBase::Get() + 80
>
>
>
>
> Why is this stack trace point showing that function
> wxStandardPathBase::Get() is in the
> module _pcbnew.kiface?
>
> This might be because you are linking with static wx libraries.  With the
> advent of
> kiface, this can never work again.
>
> All platforms must link to a shared/dynamic wx library set.  No static
> wxWidgets library
> set ever again please.
>
> Start there.  Its possible that wxTheApp is not unique. You have a second
> copy because you
> are linking wx into every frickin module.
>
> As to the ::Get() call, here is the source from svn head of wx:
>
> line 59 or so of common/stdpbase.cpp:
>
> wxStandardPaths& wxStandardPathsBase::Get()
> {
>    wxAppTraits * const traits = wxTheApp ? wxTheApp->GetTraits() : NULL;
>    wxCHECK_MSG( traits, gs_stdPaths, wxT("create wxApp before calling
> this") );
>
>    return traits->GetStandardPaths();
> }
>
>
> But we only want this to reside in the wx SHARED/DYNAMIC library, not in
> our
> _pcbnew.kiface module.
>
>
>
> 11  _pcbnew.kiface                 0x0000000108242677
> wxFileConfig::GetLocalFile(wxString const&, int) + 27
> 12  _pcbnew.kiface                 0x00000001082429ad
> wxFileConfig::wxFileConfig(wxString const&, wxString const&, wxString
> const&, wxString const&, long, wxMBConv const&) + 497
> 13  _pcbnew.kiface                 0x0000000107e20845 BIN_MOD::Init() +
> 229
> 14  _pcbnew.kiface                 0x0000000107e686d7
> KIFACE_I::start_common(int) + 39
> 15  _pcbnew.kiface                 0x00000001079141c5
> PCB::IFACE::OnKifaceStart(PGM_BASE*, int) + 21
> 16  org.kicad-eda.pcbnew           0x0000000100022609
> KIWAY::KiFACE(KIWAY::FACE_T, bool) + 441
> 17  org.kicad-eda.pcbnew           0x0000000100022ca5
> KIWAY::Player(FRAME_T, bool) + 309
> 18  org.kicad-eda.pcbnew           0x0000000100006144
> PGM_SINGLE_TOP::OnPgmInit(wxApp*) + 1428
> 19  org.kicad-eda.pcbnew           0x0000000100009bed
> APP_SINGLE_TOP::OnInit() + 45
> 20  org.kicad-eda.pcbnew           0x000000010007912c wxApp::CallOnInit()
> + 78
> 21  org.kicad-eda.pcbnew           0x0000000100292f3c wxEntry(int&,
> wchar_t**) + 76
> 22  org.kicad-eda.pcbnew           0x0000000100005b20 main + 48
> 23  org.kicad-eda.pcbnew           0x0000000100005ab4 start + 52
>
>
> and messages on console like
> <<<
> objc[17580]: Class wxNSAnimationDelegate is implemented in both
> /Volumes/MacStorage/Temp/KiCad/bin/bin/pcbnew.app/Contents/MacOS/pcbnew and
> /Volumes/MacStorage/Temp/KiCad/bin/bin/pcbnew.app/Contents/MacOS/_pcbnew.kiface.
> One of the two will be used. Which one is undefined.
> ./src/common/stdpbase.cpp(62): assert "traits" failed in Get(): create
> wxApp before calling this
>
>
> After googling a bit at least the messages on console seem to indicate
> that some wxWidgets functions are used before the wxApp is instantiated.
>
> The problem might already be known, I found this comment in the code, but
> one line below where it crashes for me.
> <<<
>   m_bm.Init();
>
>   m_bm.m_config->Read( showPageLimitsKey, &g_ShowPageLimits );
>
>   // FIXME OSX Mountain Lion (10.8)
>   // Seems that Read doesn't found anything and ColorFromInt
>   // Asserts - I'm unable to reproduce on 10.7
>
>   int draw_bg_color = BLACK;      // Default for all apps but Eeschema
>
>
>
> Any hints/ideas?
>
>
> Regards,
> Bernhard
>
> === modified file 'pcb_calculator/CMakeLists.txt'
> --- pcb_calculator/CMakeLists.txt 2014-05-12 15:17:51 +0000
> +++ pcb_calculator/CMakeLists.txt 2014-05-16 09:00:42 +0000
> @@ -134,15 +134,6 @@
>           )
>   endif()
>
> -    if( APPLE )
> -        # copies kiface into the bundle
> -        add_custom_target( _pcb_calculator_kiface_copy ALL
> -            COMMAND ${CMAKE_COMMAND} -E copy
> ${CMAKE_BINARY_DIR}/pcb_calculator/_pcb_calculator.kiface
> "${CMAKE_BINARY_DIR}/pcb_calculator/pcb_calculator.app/Contents/MacOS/"
> -            DEPENDS pcb_calculator_kiface
> -            COMMENT "Copying kiface into pcb_calculator"
> -        )
> -    endif()
> -
> else()
>
>   add_executable( pcb_calculator WIN32 MACOSX_BUNDLE
>
>
>
>
>
>
> ------------------------------------
>
> ------------------------------------
>
> Please read the Kicad FAQ in the group files section before posting your
> question.
> Please post your bug reports here. They will be picked up by the creator
> of Kicad.
> Please visit http://www.kicadlib.org for details of how to contribute
> your symbols/modules to the kicad library.
> For building Kicad from source and other development questions visit the
> kicad-devel group athttp://groups.yahoo.com/group/kicad-develYahoo Groups
> Links
>
> <*> To visit your group on the web, go to:
>   http://groups.yahoo.com/group/kicad-users/
>
> <*> Your email settings:
>   Individual Email | Traditional
>
> <*> To change settings online go to:
>   http://groups.yahoo.com/group/kicad-users/join
>   (Yahoo! ID required)
>
> <*> To change settings via email:
>   kicad-users-digest@xxxxxxxxxxxxxxx
>   kicad-users-fullfeatured@xxxxxxxxxxxxxxx
>
> <*> To unsubscribe from this group, send an email to:
>   kicad-users-unsubscribe@xxxxxxxxxxxxxxx
>
> <*> Your use of Yahoo Groups is subject to:
>   https://info.yahoo.com/legal/us/yahoo/utos/terms/
>
>
>
> __._,_.___
> Posted by: Bernhard Stegmaier <stegmaier@xxxxxxxxxxxxx>
> Reply via web post • Reply to sender • Reply to group • Start a New Topic
> • Messages in this topic (3)
> Please read the Kicad FAQ in the group files section before posting your
> question.
> Please post your bug reports here. They will be picked up by the creator
> of Kicad.
> Please visit http://www.kicadlib.org for details of how to contribute
> your symbols/modules to the kicad library.
> For building Kicad from source and other development questions visit the
> kicad-devel group athttp://groups.yahoo.com/group/kicad-devel
> VISIT YOUR GROUP
> • New Members 14
> • New Photos 3
>
> • Privacy • Unsubscribe • Terms of Use
>
> .
>
>
> __,_._,___
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References