Mac pre-release download way behind Windows version

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
pablogil
Posts: 845
Joined: Wed Nov 26, 2014 3:19 pm
Location: Badajoz (Spain)
Contact:

Re: Mac pre-release download way behind Windows version

Postby pablogil » Wed Jan 20, 2016 7:23 am

It works perfectly, thanks!
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Mac pre-release download way behind Windows version

Postby ian.rees » Thu Jan 21, 2016 6:38 am

blacey wrote:In my experience, the build fails when using the -DFREECAD_USE_3DCONNEXION=ON cmake argument if the frameworks are not installed. Any ideas?
That's expected behaviour. On Mac, the cmake configuration by default looks for the 3DConnexion Framework, and if it's found defaults FREECAD_USE_3DCONNEXION to ON. If it's not found, then it defaults to OFF. By manually specifying to use 3DConnexion when the drivers are not installed, you're essentially telling the build process to compile against some headers that it won't be able to find.

So, short answer is that generally you should have the 3DConnexion drivers installed before building, if you want FreeCAD to be built using them. Only manually specify FREECAD_USE_3DCONNEXION (=OFF) if you want to turn off that support for whatever reason.

Haven't had a chance to look at why your builds aren't finding the 3D mice in any more detail, maybe this weekend if weather isn't nice ;). -Ian-

*Note that cmake might have cached the FREECAD_USE_3DCONNEXION=ON, so you might need to start with a fresh build directory or clean the cmake cache to make things happy again.
jmaustpc
Posts: 10362
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Mac pre-release download way behind Windows version

Postby jmaustpc » Thu Jan 21, 2016 12:06 pm

ian.rees wrote: blacey wrote:
In my experience, the build fails when using the -DFREECAD_USE_3DCONNEXION=ON cmake argument if the frameworks are not installed. Any ideas?


That's expected behaviour. On Mac, the cmake configuration by default looks for the 3DConnexion Framework, and if it's found defaults FREECAD_USE_3DCONNEXION to ON. If it's not found, then it defaults to OFF. By manually specifying to use 3DConnexion when the drivers are not installed, you're essentially telling the build process to compile against some headers that it won't be able to find.
Hi all
I wonder if any of this is effect in some subtle way by if your hardware is present or not? I would agree that I would not expect it to, it should just look for the installed driver, but if the hardware is not present then the driver would not load into memory, presumably, so I wonder if something somewhere is looking at the driver or something else that only changes if the hardware is present.... :?
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Mac pre-release download way behind Windows version

Postby blacey » Thu Jan 21, 2016 4:47 pm

ian.rees wrote: That's expected behaviour. On Mac, the cmake configuration by default looks for the 3DConnexion Framework, and if it's found defaults FREECAD_USE_3DCONNEXION to ON. If it's not found, then it defaults to OFF. By manually specifying to use 3DConnexion when the drivers are not installed, you're essentially telling the build process to compile against some headers that it won't be able to find.

So, short answer is that generally you should have the 3DConnexion drivers installed before building, if you want FreeCAD to be built using them. Only manually specify FREECAD_USE_3DCONNEXION (=OFF) if you want to turn off that support for whatever reason.
My point here was that it seem the successful build & test with forced USE_3D=ON serves as an initial confirmation that the build is finding the 3D Connexion frameworks that we added to the Travis-CI build process. Here is an excerpt from the latest build that shows it downloading and installing the drivers in a virgin Travis-CI build container and then the CMAKE arguments:

Code: Select all

### Download the 3D Connexion drivers/frameworks
$ curl -o /tmp/3dFW.dmg -L 'http://www.3dconnexion.com/index.php?eID=sdl&ext=tx_iccsoftware&oid=a273bdbc-c289-e10d-816b-567043331c9e&filename=3DxWareMac_v10-2-5_r2142.dmg'

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed


  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0

  0 31.8M    0 70921    0     0  19495      0  0:28:34  0:00:03  0:28:31 19495
 11 31.8M   11 3812k    0     0   832k      0  0:00:39  0:00:04  0:00:35 3969k
 34 31.8M   34 11.1M    0     0  2038k      0  0:00:16  0:00:05  0:00:11 5800k
 58 31.8M   58 18.5M    0     0  2880k      0  0:00:11  0:00:06  0:00:05 6396k
 80 31.8M   80 25.8M    0     0  3486k      0  0:00:09  0:00:07  0:00:02 6685k
100 31.8M  100 31.8M    0     0  3893k      0  0:00:08  0:00:08 --:--:-- 6865k

### Mount the downloaded image
$ hdiutil mount /tmp/3dFW.dmg

Checksumming Protective Master Boot Record (MBR : 0)…
Protective Master Boot Record (MBR :: verified   CRC32 $AF51C71E
Checksumming GPT Header (Primary GPT Header : 1)…
 GPT Header (Primary GPT Header : 1): verified   CRC32 $78C7EF4E
Checksumming GPT Partition Data (Primary GPT Table : 2)…
GPT Partition Data (Primary GPT Tabl: verified   CRC32 $AECDC004
Checksumming  (Apple_Free : 3)…
                    (Apple_Free : 3): verified   CRC32 $00000000
Checksumming disk image (Apple_HFS : 4)…
          disk image (Apple_HFS : 4): verified   CRC32 $464DB590
Checksumming  (Apple_Free : 5)…
                    (Apple_Free : 5): verified   CRC32 $00000000
Checksumming GPT Partition Data (Backup GPT Table : 6)…
GPT Partition Data (Backup GPT Table: verified   CRC32 $AECDC004
Checksumming GPT Header (Backup GPT Header : 7)…
  GPT Header (Backup GPT Header : 7): verified   CRC32 $E0977562
verified   CRC32 $9AC5C301
/dev/disk1          	GUID_partition_scheme          	
/dev/disk1s1        	Apple_HFS                      	/Volumes/3Dconnexion Software

### Install the drivers
$ sudo installer -package /Volumes/3Dconnexion\ Software/Install\ 3Dconnexion\ software.pkg -target /

installer: Package name is 3Dconnexion Software
installer: Installing at base path /
installer: The install was successful.
installer: The install requires restarting now.

### Build FreeCAD
$ mkdir build && cd build && cmake -DFREECAD_USE_EXTERNAL_KDL=ON -DFREECAD_CREATE_MAC_APP=ON -DFREECAD_USE_3DCONNEXION=ON -DCMAKE_BUILD_TYPE=Release ../
Prior to adding the download and install of the 3DC drivers to the build steps, the build would fail looking for the appropriate headers if we explicitly set -DFREECAD_USE_3DCONNEXION=ON, which I would expect.

Furthermore, during the build and test, I see the following in the travis-ci log file indicating that the build has 3D Connexion support.

Code: Select all


## during compile.  
[ 34%] Building CXX object src/Mod/Image/App/CMakeFiles/Image.dir/AppImage.cpp.o
[ 34%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/3Dconnexion/GuiApplicationNativeEventAwareMac.cpp.o
[ 34%] Building CXX object src/Gui/CMakeFiles/FreeCADGui.dir/Application.cpp.o

## during test execution.
Log: Toolbars restored
Log: 3Dconnexion device initialized. Client ID: 4096
Log: Init: Entering event loop
So it seems, at least on the Travis-CI host, that it is working properly. Perhaps I am using a different version of the driver/frameworks than what you have installed on your system but as long as the frameworks support the OS and hardware, FreeCAD should find them and load them.
  • I haven't looked at the CMAKE files in detail, but do you report that the 3D Drivers were found if the cmake search finds them?
  • Perhaps you can enable logging when you launch FreeCAD and look to see if the 3Dconnexion device initialized. Client ID: XXXX log message is issued?
ian.rees wrote: Haven't had a chance to look at why your builds aren't finding the 3D mice in any more detail, maybe this weekend if weather isn't nice ;). -Ian-
No worries - I don't have a SpaceNAV mouse so it is a bit hard for me to take this any further but it seems it should be working... I have considered ordering a 3D mouse but haven't pulled the trigger yet - it would be better if we can get it working with your hardware.
ian.rees wrote: *Note that cmake might have cached the FREECAD_USE_3DCONNEXION=ON, so you might need to start with a fresh build directory or clean the cmake cache to make things happy again.
Each Travis-CI build spins up a virgin container VM so everything has be installed from scratch, including git pull and creating a new build directory so I don't think the cache is biting us here.

Thanks for the feedback and help - we'll get this working ;)

Cheers,
Bruce
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Mac pre-release download way behind Windows version

Postby ian.rees » Thu Jan 21, 2016 7:45 pm

jmaustpc wrote:I wonder if any of this is effect in some subtle way by if your hardware is present or not?
Tested this, on my machine the 3D mouse works fine using a build done with the drivers installed and 3D mouse disconnected. -Ian-
User avatar
sgrogan
Posts: 6163
Joined: Wed Oct 22, 2014 5:02 pm

Re: Mac pre-release download way behind Windows version

Postby sgrogan » Thu Jan 21, 2016 7:49 pm

ian.rees wrote: Tested this, on my machine the 3D mouse works fine using a build done with the drivers installed and 3D mouse disconnected. -Ian-
Ian, do you have just the drivers or the drivers and the SDK installed.
If just the drivers, where did you get them from?
"fight the good fight"
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Mac pre-release download way behind Windows version

Postby ian.rees » Thu Jan 21, 2016 7:59 pm

sgrogan wrote:Ian, do you have just the drivers or the drivers and the SDK installed.
IIRC the drivers and SDK come in the same package for Mac. The file I downloaded most recently (I think for looking at this issue a few weeks back) is called "3DxWareMac_v10-2-4_r2077.dmg". I got them from the downloads section of the 3Dconnexion site.
blacey wrote:Perhaps you can enable logging when you launch FreeCAD and look to see if the 3Dconnexion device initialized. Client ID: XXXX log message is issued?
Yes, I do see that in the log [edit: with the build I just did locally] with the 3D mouse connected, and interestingly also when it's disconnected.

Need to run off to work now. -Ian-
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Mac pre-release download way behind Windows version

Postby blacey » Thu Jan 21, 2016 8:03 pm

ian.rees wrote: IIRC the drivers and SDK come in the same package for Mac. The file I downloaded most recently (I think for looking at this issue a few weeks back) is called "3DxWareMac_v10-2-4_r2077.dmg". I got them from the downloads section of the 3Dconnexion site.
Need to run off to work now. -Ian-
FYI, we're using version 3DxWareMac_v10-2-5_r2142.dmg in the Travis-CI build.
ian.rees
Posts: 696
Joined: Sun Jun 15, 2014 3:28 am
Contact:

Re: Mac pre-release download way behind Windows version

Postby ian.rees » Fri Jan 22, 2016 9:51 am

Got the 3Dconnexion thing mostly figured out, will need to do some research tomorrow on how best to fix it. The issue is that MakeMacBundleRelocatable.py is setting the wrong rpath to look for the 3Dconnexion Framework in the binaries that make up FreeCAD. -Ian-
peterl94
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: Mac pre-release download way behind Windows version

Postby peterl94 » Fri Jan 22, 2016 6:22 pm

Good find, Ian! I totally was not thinking of that. I simply excluded the framework from being brought into the bundle and it seemed to work fine with the spacenav I use at work. The 3dconnexion framework is weak linked, so I think that means it won't cause problems for people who don't have the driver installed.

Code: Select all

diff --git a/src/Tools/MakeMacBundleRelocatable.py b/src/Tools/MakeMacBundleRelocatable.py
index d44a949..fae2910 100644
--- a/src/Tools/MakeMacBundleRelocatable.py
+++ b/src/Tools/MakeMacBundleRelocatable.py
@@ -3,7 +3,7 @@ import sys
 import subprocess
 import pprint
 
-SYS_PATHS = ["/System/", "/usr/lib/"]
+SYS_PATHS = ["/System/", "/usr/lib/", "/Library/Frameworks/3DconnexionClient.framework"]
 
 class LibraryNotFound(Exception):
     pass