Cocoa backend stills launches XQuartz

69 views
Skip to first unread message

jelle feringa

unread,
Apr 27, 2013, 6:44:54 AM4/27/13
to oce...@googlegroups.com
First of all, its been _such_ an awesome week being able to use the Cocoa rather than X11 backend! Out with the old, in with the new! Thanks so much guys, I'm much indepted here...

So, its been wonderful to use the full power of Qt rather than the hacky X11 ports of the latter on osx.

Alright, one issue is that with oce-0.12 ( and pythonocc 0.6-alpha2 ) still XQuartz is launched. 
In order to find out why I killed the XQuartz daemon:

launchctl unload -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

Perhaps that provides with a hint of where to look?
Seems like Aspect_GraphicDeviceDefinitionError still relies on X11.

 ###### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
Traceback (most recent call last):
  File "/Library/Python/2.6/site-packages/OCC/Display/traitShapeEditor.py", line 88, in paintEvent
    self.InitDriver()
  File "/Library/Python/2.6/site-packages/OCC/Display/traitShapeEditor.py", line 97, in InitDriver
    self._display.Create()
  File "/Library/Python/2.6/site-packages/OCC/Display/OCCViewer.py", line 96, in Create
    self.Init(self._window_handle)
RuntimeError: Aspect_GraphicDeviceDefinitionError
Cannot connect to server '/tmp/launch-FgESHU/org.macosforge.xquartz:0'

Cheers,

-jelle

Thomas Paviot

unread,
Apr 27, 2013, 8:54:01 AM4/27/13
to oce...@googlegroups.com
2013/4/27 jelle feringa <jellef...@gmail.com>
Hi Jelle,

oce-0.12 came with a few improvements from OCCT that were not released at that time. In oce-0.12, OSX support is not complete, XQuartz is still necessary because the GraphicDevice needs X11 to be initialized. The complete OSX support (requiring *only* Cocoa) was released a few days ago with version 6.6.0 of OCCT. That means you'll have to wait until oce-0.13 is released to benefit from this feature. db/OCCT660 is ready to be tested and should compile fine on your machine (I just finished to succesfully compile this branch).

Cheers,

Thomas


jelle feringa

unread,
Apr 27, 2013, 10:26:08 AM4/27/13
to oce...@googlegroups.com
Many thanks for the detailed answer. Indeed, I read that the Cocoa port was only finished with the 6.6.0 release, I wasnt aware of the exact status in OCE, since I noticed that you've been working quite a bit on this front. Much looking for oce-0.13 and once again, thanks so much for this effort OCE team!

-jelle

Andrey Betenev

unread,
Apr 27, 2013, 10:37:49 AM4/27/13
to oce...@googlegroups.com, jelle feringa
Hello Jelle,

Sorry, just wondering if you consider using OCCT 6.6.0 directly
without waiting for OCE to absorb this version? If not, could you
share a reason? Thank you!

Best Regards,
Andrey

Цитирую jelle feringa <jellef...@gmail.com>:
> --
> You received this message because you are subscribed to the Google
> Groups "oce-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to oce-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

jelle

unread,
Apr 28, 2013, 10:32:51 AM4/28/13
to oce...@googlegroups.com, jelle feringa
Hi Andrey,

Interesting question:

* I trust the OCE team to fix the few portability issues that use to come with a new OCCT release ;
* the OCE team will bring QA improvements: compiler warning fixes, cppcheck fixes etc ;
* there's no emergency to move up to OCCT660, I  prefer wait for the OCE team to clean the lastest OCCT improvements before switching to this new release.
* you can build OCE with CMake without having to use WOK.
* the CMake build infrastructure itself in general is an important argument

That said, the Cocoa port is awesome... a welcome modernization of the OCC codebase!

-jelle

Andrey Betenev

unread,
Apr 29, 2013, 1:10:23 AM4/29/13
to oce...@googlegroups.com
Hello Jelle and John,

Thanks for sharing your opinion!

The fact is, OCCT 6.6.0 source package includes CMake build tools, thus you can give it a try without waiting for OCE.
And FTGL is dropped in OCCT 6.6.0.
Note that WOK has never been required for building OCCT from sources included in releases; it was (and still is) necessary only when you do some changes in CDL files.

Andrey

28.04.2013 20:56, John Cary пишет:
With regard to the question of "why OCE":

I too (as noted when we had Sergey Z visit last year), am using the OCE code base.  The cmakification
(and corresponding WOK elimination) greatly simplifies our automated build/test system across the
many systems we must work on. 

OTOH, I anxiously await the dropping of the FTGL library, as it is nearly impossible to build on Windows.

.......John

jelle feringa

unread,
Apr 29, 2013, 4:42:18 AM4/29/13
to oce...@googlegroups.com
Thanks for sharing your opinion!

Thank you for taking notice of the discussion on this forum.
I do hope OCC sees OCE as an ally.
 
The fact is, OCCT 6.6.0 source package includes CMake build tools, thus you can give it a try without waiting for OCE.

Good news.
 
And FTGL is dropped in OCCT 6.6.0.

More good news.
 
Note that WOK has never been required for building OCCT from sources included in releases; it was (and still is) necessary only when you do some changes in CDL files.

I wasn't aware of this...
Thanks for the headsup Andrey.

-jelle


Thomas Paviot

unread,
Apr 29, 2013, 9:25:05 AM4/29/13
to oce...@googlegroups.com, andrey....@opencascade.com
Dear Andrey,

I had a look at the latest OCCT release, and wanted to build OCCT on OSX using CMake. I expected something simple, but:
* opening the /ros-what-a-strange-name folder, I could not find any root CMakeList.txt file. There are tons of automake files, MS Project, xcode, codeblock etc.
* the README does not give a lot of clue. The first step "download/install/build third part libraries" is ok: no need for me to do anything, everything is on my machine. The second point is less easy: "2. Install and configure WOK development environment". "3. Use WOK". Since I don't want to install/use WOK, I gave up with the README.
*  I then opened the pdf manual "OCCT_Build_with_CMake.pdf". I expected something simple but, waoo, 15 pages just to explain how to use cmake! On the third page, this damn WOK is back. I continued reading, just for fun, and found this funny line :
"""
In the WOK prompt, in the created workbench, use wgenproj command with -target=cmake argument
:LOC:dev:occt> wgenproj –target=cmake
""" 
How could some real and normal human being could understand such a mess? As a result, I gave up with that and waited for Denis to push occt changes to the oce git repository. Thanks to him, this was done only 48 hours after occt660 was released.

Dear Andrey, you wrote that "WOK has never been required for building OCCT from source included in releases" as if it was obvious. For you, maybe, but for most users who use to read the README before going into a long compilation process, you must admit that the sentence (from README) "In order to build OCCT libraries from these sources for use in your program, you need to: 1. [...] 2. Install and configure WOK development environment." is confusing, isn't it? I guess this clarification should certainly be more valuable on the occ forum than on the oce user group.

Best Regards,

Thomas

2013/4/29 Andrey Betenev <andrey....@opencascade.com>

JR Cary

unread,
Apr 29, 2013, 10:08:42 AM4/29/13
to oce...@googlegroups.com
I hope it is okay that I changed the subject to more accurately reflect the
discussion.

So then can one now build oce-master without ftgl?

Thanks.....John
You received this message because you are subscribed to a topic in the Google Groups "oce-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/oce-dev/axCt0KWuQOc/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to oce-dev+u...@googlegroups.com.

Thomas Paviot

unread,
Apr 29, 2013, 10:48:34 AM4/29/13
to oce...@googlegroups.com
Hi John,

Not yet. You have to wait untill db/OCCT660 is merged into master (in db/OCCT660, ftgl has been dropped).

Thomas

2013/4/29 JR Cary <ca...@txcorp.com>

Andrey Betenev

unread,
Apr 30, 2013, 12:52:37 AM4/30/13
to Thomas Paviot, oce...@googlegroups.com
Dear Thomas,

Thank you for the remarks (even if unpleasant)!

Indeed, the README file included in the package is wrong one, it was created as a guidelines for developers using OCCT through Git repository.
The CMake user's guide is also mostly oriented on developers who work with Git repo directly and hence naturally use WOK.
The more user-oriented instructions are present in the Overview documentation (HTML).
We shall update the package to include adequate README and build instructions adapted for users rather than developers.

Besides, CMake project files are located in the same subfolder as in OCE: $CASROOT/adm/cmake (just aside of xcode and other mentioned files).
This location is indicated on page 10 of the OCCT_Build_with_CMake.pdf document, right below the "funny line".
Other users seem to had no problem finding it...
Hope next time we will be able to fit better your expectations.

Best Regards,
Andrey

29.04.2013 17:25, Thomas Paviot пишет:

jelle feringa

unread,
Apr 30, 2013, 4:07:04 AM4/30/13
to oce...@googlegroups.com
I'm just wondering why OCCT and OCE are not joining efforts on the CMake transition?
I think all involved can agree on the importance of being good neighbours...
I'm aware of some of the legal ( signing off ) issues involved, but that collaborative and open spirit is certainly present.

-jelle

Thomas Paviot

unread,
May 5, 2013, 8:36:29 AM5/5/13
to oce...@googlegroups.com
Hi John,

Changes from upstream occt660 were merged into master a couple of hours ago. You should be able to compile/run oce master branch without any need for ftgl. Note however that you may have to fix your code since occt660 comes with an API change. Your feedback is welcome.

Regards,

Thomas


2013/4/29 Thomas Paviot <tpa...@gmail.com>
Reply all
Reply to author
Forward
0 new messages