Attached patch fixes kicad-ogltest for macOS.

It puts kicad-ogltest as console tool into the main kicad bundle where also the other tools are, and fixes the library bundling issues:
<<<
HackMini:bin bstegmaier$ ls -al kicad.app/Contents/MacOS/
total 13992
drwxr-xr-x  9 bstegmaier  staff      306 May 16 20:31 .
drwxr-xr-x  9 bstegmaier  staff      306 May 16 20:32 ..
-rwxr-xr-x  1 bstegmaier  staff   829992 May 16 20:32 dxf2idf
-rwxr-xr-x  1 bstegmaier  staff   539228 May 16 20:32 idf2vrml
-rwxr-xr-x  1 bstegmaier  staff    40292 May 16 20:32 idfcyl
-rwxr-xr-x  1 bstegmaier  staff    35956 May 16 20:32 idfrect
-rwxr-xr-x  1 bstegmaier  staff  1195612 May 16 20:32 kicad
-rwxr-xr-x  1 bstegmaier  staff  4074860 May 16 20:32 kicad-ogltest
-rwxr-xr-x  1 bstegmaier  staff   442252 May 16 20:32 kicad2step
HackMini:bin bstegmaier$ kicad.app/Contents/MacOS/kicad-ogltest 
INFO: Instantiated GL window
INFO: Found OpenGL version 2.1
INFO: Successfully called OPENGL_GAL::BeginDrawing
PASS
HackMini:bin bstegmaier$ 
>>>

Regards,
Bernhard

Attachment: kicad-ogltest.patch
Description: Binary data



On 6. May 2017, at 01:10, Chris Pavlina <[email protected]> wrote:

On Fri, May 05, 2017 at 09:24:38PM +0200, Bernhard Stegmaier wrote:
… hmm, not really sure, just a guess.
It could have started to break with that change:
 https://git.launchpad.net/kicad/commit/utils/kicad-ogltest/CMakeLists.txt?id=7b4ea2a382f949150ea4f145ac9f4d2a59ec2591 <https://git.launchpad.net/kicad/commit/utils/kicad-ogltest/CMakeLists.txt?id=7b4ea2a382f949150ea4f145ac9f4d2a59ec2591>

Without the “MACOSX_BUNDLE” it probably didn’t try to build the bundle and thus also didn’t fail in making it relocatable.
My last build was just before this change (2017-04-02).

BTW:
It doesn’t fail during compile, but during “make install”.
If you don’t do a "make install”, that could be why you don’t see it?

No, I just failed to double-check before sending my email. It is indeed
broken for me too, but it worked the last time I worked on it. A commit
after my own broke it. Still looking at it.



Regards,
Bernhard

On 5. May 2017, at 21:07, Bernhard Stegmaier <[email protected]> wrote:

Hi,

this seems to be quite incomplete. It is the last step making the bundle relocatable that fails.

First, what is kicad-ogltest supposed to be?
A real application bundle or just a standalone (command line) binary?

For a real application bundle you will probably need a Info.plist like for the other bundles.
Further, you would need to use a CMakeLists.txt like for the other app bundles, like e.g. for pcb_calculator:
<<<
if( APPLE )
   set_target_properties( pcb_calculator PROPERTIES
       MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist
       )

   # puts binaries into the *.app bundle while linking
   set_target_properties( pcb_calculator_kiface PROPERTIES
       LIBRARY_OUTPUT_DIRECTORY ${OSX_BUNDLE_BUILD_KIFACE_DIR}
       )

   # put individual bundle outside of main bundle as a first step
   # will be pulled into the main bundle when creating main bundle
   install( TARGETS pcb_calculator
       DESTINATION ${KICAD_BIN}
       COMPONENT binary
       )
   install( CODE "
       # override default embedded path settings
       ${OSX_BUNDLE_OVERRIDE_PATHS}

       # do all the work
       include( BundleUtilities )
       fixup_bundle( ${KICAD_BIN}/pcb_calculator.app/Contents/MacOS/pcb_calculator
           \"\"
           \"\"
           )
       " COMPONENT Runtime
       )
else()

If you don’t do it like that (especially the “install( CODE” part) it won’t find/use the libs copied into the bundle.
From the error, I guess that’s exactly the problem you see.

I also didn’t notice this when I did my last build.
I can definitely look into it, but I currently don’t have my development machine up and running… will probably take another week or so.


Regards,
Bernhard

On 5. May 2017, at 18:24, Chris Pavlina <[email protected] <mailto:[email protected]>> wrote:

Hi,

Apologies for my absense. I'm looking into the issue with macOS nightles
not building, which appears to be because of kicad-ogltest which I added
a while ago.

I'm still really busy and am having trouble finding real time for this,
but I want to get the nightlies going again. If I can't actually find
the issue, I'm going to just revert all the ogltest commits for now.

I would definitely appreciate if someone familiar with the build system
could look into it, because it does build for me on macOS and the error
messages are pretty cryptic to me.

Link to the build log from the first failing build:

http://ci.kicad-pcb.org/job/osx-kicad-adam-head/264/console <http://ci.kicad-pcb.org/job/osx-kicad-adam-head/264/console>

--
Chris

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to