[RFC] Work in progress about CMake usage

5 views
Skip to first unread message

D. Barbier

unread,
Aug 16, 2011, 8:13:28 PM8/16/11
to oce...@googlegroups.com
Hello,

Here are the branches I am currently working on:
* review/TKernel-depends-on-dl (issue #80)
Let TKernel depend on ${CMAKE_DL_LIBS} to avoid indirect dependencies.
* db/change-cmake-install-path
Change installation path of CMake files; with these changes, I
believe that OCC complies with
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package
Pull request will come soon, unless there are objections.
* db/make_DRAWEXE_relocatable
Make DRAWEXE relocatable
This is not very useful, it is mostly meant to show how to build
relocatable binaries. Tested only on Linux+gcc, other toolchains need
changes. I can request a pulll now, or wait for other toolchains.
* db/TKService-drop-X11-dependency (issues #12 and #36)
Change OSD_FontMgr.cxx so that TKernel does not depend on X11.
This one works on Linux (and does not affect Windows) but not on
Darwin.

Denis

Thomas Paviot

unread,
Aug 17, 2011, 5:03:05 AM8/17/11
to oce...@googlegroups.com
2011/8/17 D. Barbier <bou...@gmail.com>
Hello,

Hello Denis,
 

Here are the branches I am currently working on:
 * review/TKernel-depends-on-dl (issue #80)
    Let TKernel depend on ${CMAKE_DL_LIBS} to avoid indirect dependencies.

I thought this issue was closed a few hours ago. I'll have a look at the new one.
 
 * db/change-cmake-install-path
    Change installation path of CMake files; with these changes, I
believe that OCC complies with
       http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:find_package
    Pull request will come soon, unless there are objections.

Great. It would be nice to have a feedback from downstream oce users regarding this change, for instance HeeksCad team.

 * db/make_DRAWEXE_relocatable
    Make DRAWEXE relocatable
    This is not very useful, it is mostly meant to show how to build
relocatable binaries.  Tested only on Linux+gcc, other toolchains need
changes.  I can request a pulll now, or wait for other toolchains.
 * db/TKService-drop-X11-dependency (issues #12 and #36)
    Change OSD_FontMgr.cxx so that TKernel does not depend on X11.
This one works on Linux (and does not affect Windows) but not on
Darwin.

This one would be a great achievement. Unfortunately, I still did not achieve to get it successful on Darwin (although it compiles, there are some runtime issues with drawing labels). I will follow your suggestionsin order to figure out what's going wrong.

If other Darwin users want to contribute debugging, these issues are discussed here, feel free to test/comment: https://github.com/tpaviot/oce/commit/26a1097cfe590884fb818e2ff3305b1fd3385e67.


Denis

Thomas

D. Barbier

unread,
Aug 17, 2011, 3:17:50 PM8/17/11
to oce...@googlegroups.com
On 2011/8/17 Thomas Paviot wrote:
[...]

>>  * db/TKService-drop-X11-dependency (issues #12 and #36)
>>     Change OSD_FontMgr.cxx so that TKernel does not depend on X11.
>> This one works on Linux (and does not affect Windows) but not on
>> Darwin.
>
> This one would be a great achievement. Unfortunately, I still did not
> achieve to get it successful on Darwin (although it compiles, there are some
> runtime issues with drawing labels). I will follow your suggestionsin order
> to figure out what's going wrong.
>
> If other Darwin users want to contribute debugging, these issues are
> discussed here, feel free to test/comment:
> https://github.com/tpaviot/oce/commit/26a1097cfe590884fb818e2ff3305b1fd3385e67.

Please also send the font path shown when running this command:
xset q
Thanks.

Denis

Thomas Paviot

unread,
Aug 17, 2011, 4:34:31 PM8/17/11
to oce...@googlegroups.com
2011/8/17 D. Barbier <bou...@gmail.com>
Font Path:
  /usr/X11/lib/X11/fonts/misc/,/usr/X11/lib/X11/fonts/TTF/,/usr/X11/lib/X11/fonts/OTF,/usr/X11/lib/X11/fonts/Type1/,/usr/X11/lib/X11/fonts/75dpi/:unscaled,/usr/X11/lib/X11/fonts/100dpi/:unscaled,/usr/X11/lib/X11/fonts/75dpi/,/usr/X11/lib/X11/fonts/100dpi/,/Library/Fonts,/System/Library/Fonts

Thomas

D. Barbier

unread,
Aug 17, 2011, 5:29:27 PM8/17/11
to oce...@googlegroups.com

Great, I added /usr/X11/lib/X11/fonts to X11_FONT_PATH on the
db/TKService-drop-X11-dependency branch. Can you please check again?
It should work for you now.

You can also run
FONTPATH=/usr/X11/lib/X11 DRAWEXE
if you do not want to recompile.

Denis

Thomas Paviot

unread,
Aug 17, 2011, 5:36:37 PM8/17/11
to oce...@googlegroups.com
Setting FONTPATH=/usr/X11/lib/X11 works (i.e. labels are properly displayed).

I'm currently recompiling to check your fix. Thanks!

Thomas

Thomas Paviot

unread,
Aug 18, 2011, 3:33:49 AM8/18/11
to oce...@googlegroups.com
2011/8/17 Thomas Paviot <tpa...@gmail.com>
Strange, your fix doesn't work. I have to manually setup FONTPATH otherwise no font is displayed.

Thomas

D. Barbier

unread,
Aug 18, 2011, 4:40:57 AM8/18/11
to oce...@googlegroups.com

My suggestion was inconsistent, I added /usr/X11/lib/X11/fonts to
X11_FONT_PATH but told you to set FONTPATH to /usr/X11/lib/X11. If
you set it to /usr/X11/lib/X11/fonts instead, or change X11_FONT_PATH
to /usr/X11/lib/X11, I hope that behaviors become identical. Of
course, this does not explain why it does not work.

BTW can you please ack or merge https://github.com/tpaviot/oce/pull/80
I would like to rebase db/TKService-drop-X11-dependency against
review/TKernel-depends-on-dl.

Denis

Thomas Paviot

unread,
Aug 18, 2011, 7:41:47 AM8/18/11
to oce...@googlegroups.com
2011/8/18 D. Barbier <bou...@gmail.com>

Done.
 

Denis

Thomas

Thomas Paviot

unread,
Aug 18, 2011, 8:44:28 AM8/18/11
to oce...@googlegroups.com
2011/8/18 D. Barbier <bou...@gmail.com>

I can't explain anymore. Passing the font path through the FONTPATH=/usr/X11/lib/X11/fonts variable works, whereas it fails at compile time (-DX11_FONT_PATH=/usr/X11/lib/X11/fonts).

Complete report is available at: https://github.com/tpaviot/oce/commit/26a1097cfe590884fb818e2ff3305b1fd3385e67#commitcomment-538601

Thomas

Thomas Paviot

unread,
Aug 18, 2011, 10:57:00 AM8/18/11
to oce...@googlegroups.com
2011/8/18 Thomas Paviot <tpa...@gmail.com>

Ok, I got it: my CMake cache X11_FONT_PATH value was set to linux font paths! I rebuilt the whole OCE after deleting the cache, and everything is ok with your branch (both compile and runtime).

You should create a pull request so that this work can be merged to master.

Thomas
 

Reply all
Reply to author
Forward
0 new messages