ARCHIVE_OUTPUT_DIRECTORY

113 views
Skip to first unread message

benjami...@compositence.de

unread,
Sep 10, 2015, 4:05:18 AM9/10/15
to oce-dev
Hi,

my CMake version is 3.0.1. I am working with MinGw64 most of the time. When trying to use oce-win-bundle, I had troubles with the ARCHIVE_OUTPUT_DIRECTORY. The entry "FREETYPE_LIBRARY" has the value "FREETYPE_ARCHIVE_OUTPUT_DIRECTORY-NOTFOUND/./freetype.lib" and so on for the other libraries. I had some discussion with someone and the conclusion was that there might be an error in the MinGw generator of CMake. Therefore I had created commit 9ff74e750b585973c6992074b03f0000b1dd6adf which uses commands like

set(FREETYPE_ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH})

to set archive output directories. With that everything works for me with MinGw64.

Now I am trying to build with MSVC 2013 (Express edition). And I see the same error. Therefore it had nothing to do with MinGw. Also the same remedy works. If I put the set command as shown above also into the else(MINGW)-branch in CMakeLists.txt, I can configure and generate a build with CMake.

Has anyone ever encountered this problem? Which CMake versions do you use? I had tried two versions (AFAIK 2.8 and 3.0.1) and I always have this problem.

Since I do not use MSVC very often, it is not important for me to fix this. Still I am very much interested in your opinions!

Benjamin

QbProg

unread,
Sep 10, 2015, 7:33:17 AM9/10/15
to oce-dev

Could you try the new review/new-oce-bundle branch? It should fix the issue.
Just extract or clone the bundle (use qb/new-bundle branch) in the oce/oce-win-bundle subdir and configure
The bundle libs will be compiled along oce.
Let me know if it works!


--
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/d/optout.

benjami...@compositence.de

unread,
Sep 11, 2015, 5:05:42 AM9/11/15
to oce-dev
The error with the ARCHIVE_OUTPUT_DIRECTORY does not appear anymore. Still it does not work. The CMake output display shows:

--------------
Build 32bit

CMake Error at D:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 (message):
Could NOT find Freetype (missing: FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
Call Stack (most recent call first):
D:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 (_FPHSA_FAILURE_MESSAGE)
D:/Program Files (x86)/CMake/share/cmake-3.0/Modules/FindFreetype.cmake:138 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:426 (find_package)

Configuring incomplete, errors occurred!

See also "D:/OpenCascade/BuildTest/CMakeFiles/CMakeOutput.log".

See also "D:/OpenCascade/BuildTest/CMakeFiles/CMakeError.log".

--------------


The file CMakeError.log contains the following:


--------------


Determining if files pthread.h exist failed with the following output:
Change Dir: D:/OpenCascade/BuildTest/CMakeFiles/CMakeTmp

Run Build Command:"nmake" "/NOLOGO" "cmTryCompileExec1621131168\fast"
    "D:\Programme (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe" -f CMakeFiles\cmTryCompileExec1621131168.dir\build.make /nologo -L                  CMakeFiles\cmTryCompileExec1621131168.dir\build

    "D:\Program Files (x86)\CMake\bin\cmake.exe" -E cmake_progress_report D:\OpenCascade\BuildTest\CMakeFiles\CMakeTmp\CMakeFiles 1

Building C object CMakeFiles/cmTryCompileExec1621131168.dir/CheckIncludeFiles.c.obj
    D:\PROGRA~4\MICROS~1.0\VC\bin\cl.exe  @C:\Users\BENJAM~1.BIH\AppData\Local\Temp\nmEEF2.tmp

CheckIncludeFiles.c

D:\OpenCascade\BuildTest\CMakeFiles\CMakeTmp\CheckIncludeFiles.c(2) : fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "pthread.h": No such file or directory

NMAKE : fatal error U1077: "D:\PROGRA~4\MICROS~1.0\VC\bin\cl.exe": Rückgabe-Code "0x2"

Stop.

NMAKE : fatal error U1077: ""D:\Programme (x86)\Microsoft Visual Studio 12.0\VC\BIN\nmake.exe"": Rückgabe-Code "0x2"

Stop.


Source:
/* */
#include <pthread.h>


int main(){return 0;}


--------------

benjami...@compositence.de

unread,
Sep 11, 2015, 5:12:00 AM9/11/15
to oce-dev
Just for completeness: my oce-win-bundle is in the path d:\oce\oce-win-bundle. And the error message about missing FREETYPE_LIBRARY and FREETYPE_INCLUDE_DIRS also happens when I try to use MSys make files and MinGw.

QbProg

unread,
Sep 11, 2015, 7:36:08 AM9/11/15
to oce-dev

Which mingw version are you using?

benjami...@compositence.de

unread,
Sep 11, 2015, 8:19:58 AM9/11/15
to oce-dev

Thomas Paviot

unread,
Sep 11, 2015, 1:18:42 PM9/11/15
to oce...@googlegroups.com
btw, what's the difference between seh and sjlj mingw5.1.0 builds ? My appveyor script uses sjlj build and win32 threads. Should I prefer posix threads ? what's your opinion about the best mingw version for oce ?

Thomas

Thomas Paviot

unread,
Sep 12, 2015, 1:10:13 AM9/12/15
to oce...@googlegroups.com

QbProg

unread,
Sep 12, 2015, 9:05:12 AM9/12/15
to oce...@googlegroups.com
Thomas, Bejamin, I just tryed with a clean copy and it configures correctly (I used the 5.2.0 link above). Could you try with an empty directory or to delete the CMAKE cache?
Also, make sure the bundle branch is qb/new-bundle :)

QbProg

unread,
Sep 12, 2015, 9:07:12 AM9/12/15
to oce...@googlegroups.com
Ah, even if it configures, the build fails with 5.2.0
 in freetype -> DeprecationMgr.cpp
should take a look

benjami...@compositence.de

unread,
Sep 14, 2015, 3:09:11 AM9/14/15
to oce-dev
SEH and SJLJ refers to the type of exception handling. SEH has zero overhead, therefore we use it. See http://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh.

benjami...@compositence.de

unread,
Sep 14, 2015, 9:42:31 AM9/14/15
to oce-dev
I have checked it again. I am on the branch qb/new-bundle in oce-win-bundle and on the branch review/new-oce-bundle in oce. I have also tried CMake 3.3.1 instead of 3.0.1. It stays the same.

QbProg

unread,
Sep 14, 2015, 3:07:40 PM9/14/15
to oce-dev
Hi benjamin ,
you cleaned the cmake-cache , did you?
I pushed a bunch of commits in bundle branch to support mingw64 in freeimage. It's still compiling, but the bundle libraries should be ok now.
Anyway, if you are online tonight could we do a quick teamviewer session to see what's wrong with configure?

My sequence is always
set path=%path%;C:\mingw64\bin\
git clone http://github.com/tpaviot/oce oce
cd oce
git checkout review/new-oce-bundle
git clone http://github.com/QbProg/oce-win-bundle oce-win-bundle
cd oce-win-bundle
git checkout qb/new-bundle
cd \
mkdir my-new-build-dir
cd my-new-build-dir
cmake -G "MinGW Makefiles" ..\oce
mingw32-make (-j8)

that's all

benjami...@compositence.de

unread,
Sep 15, 2015, 4:24:42 AM9/15/15
to oce-dev
I cleaned the cache, I removed the build directory, I removed both repositories and checked them out again using exactly the commands you have posted here (in the same sequence, only path setting is not necessary here, since MinGw is in the path already).

I have tried MSYS Makefiles and MinGW Makefiles. It never works. The only way to make it work is to have the MSYS bin direction added to the path. Then CMake finds Freetype, since it is also bundled with MSYS.

QbProg

unread,
Sep 15, 2015, 2:18:23 PM9/15/15
to oce-dev
I updated the Mingw64 support for library installation and static compilation.
Using static libs , tests still don't compile.
Using dynamic compilation a test fails, regarding unicode support in ocaf.

benjami...@compositence.de

unread,
Sep 17, 2015, 7:49:19 AM9/17/15
to oce-dev
For the record: oce-win-bundle must be inside oce, then it works.

I am sorry. I have concentrated so much on the clone and on the branch check-out commands, that I have missed the differences in change-directory commands. ;-)


Am Montag, 14. September 2015 21:07:40 UTC+2 schrieb QbProg:

Petr

unread,
Jan 21, 2016, 4:02:48 AM1/21/16
to oce-dev
For the record: oce-win-bundle must be inside oce, then it works.

Maybe it would be useful for others to update the oce/BUILD.MINGWw64.md file and mention this information there. It took me some time till I found it to fix the OCE compilation  with MinGW w64/MSYS using the Oce-Win-Bundle sources.

Petr
Reply all
Reply to author
Forward
0 new messages