Kakadu / lablqml

Interfacing Qt/QML with OCaml. Formely known as lablqt
http://kakadu.github.io/lablqml
GNU Lesser General Public License v2.1
159 stars 17 forks source link

cannot install on osx #17

Closed akovbovich closed 10 years ago

akovbovich commented 10 years ago
export PKG_CONFIG_PATH=/Users/andy/Qt/5.3/clang_64/lib/pkgconfig
export LD_LIBRARY_PATH=/Users/andy/Qt/5.3/clang_64/lib

Ξ tmp/lablqt git:(915fd25...) ▶ ./configure
N.B. Don't forget to export right LD_LIBRARY_PATH and PKG_CONFIG_PATH for Qt5 before running this!
OCaml 4.02.0+dev10-2014-05-20 found.
ocamlfind found.
qmake found for Qt 5.3.1
Compiling test C++&Qt application...
Test C++&Qt application is built successfully
Generating Makefile

Ξ tmp/lablqt git:(915fd25...) ▶ make
cd /private/tmp/lablqt/src &&  ocamlbuild -use-ocamlfind ppxext/ppx_qt.native
Finished, 0 targets (0 cached) in 00:00:00.
File "_tags", line 39, characters 38-60:
Warning: the tag "package_sexplib.syntax" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
File "_tags", line 40, characters 35-57:
Warning: the tag "package_sexplib.syntax" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
File "_tags", line 41, characters 33-55:
Warning: the tag "package_sexplib.syntax" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
File "_tags", line 42, characters 35-57:
Warning: the tag "package_sexplib.syntax" is not used in any flag declaration, so it will have no effect; it may be a typo. Otherwise use `mark_tag_used` in your myocamlbuild.ml to disable this warning.
Finished, 7 targets (7 cached) in 00:00:00.
W: Cannot get variable ext_obj
W: Cannot get variable ext_lib
W: Cannot get variable ext_dll
W: Cannot get variable ocamlfind
W: Cannot get variable ocamlfind
W: Cannot get variable ocamlfind
W: Cannot get variable ocamlfind
W: Cannot get variable ocamlfind
W: Cannot get variable ocamlfind
rm -f /private/tmp/lablqt/qml/ppx_qt && ln -s /private/tmp/lablqt/src/ppx_qt.native /private/tmp/lablqt/qml/ppx_qt
if [ ! -e /private/tmp/lablqt/lablqml/Makefile ]; then cd /private/tmp/lablqt/lablqml && ./configure; fi
make -C /private/tmp/lablqt/lablqml
ocaml setup.ml -build
File "setup.ml", line 213, characters 8-26:
Warning 3: deprecated feature: String.set
Finished, 0 targets (0 cached) in 00:00:00.
+ ocamlfind ocamlc -ccopt '-std=c++0x' -ccopt -x -ccopt c++ -ccopt '`pkg-config' -ccopt --cflags -ccopt Qt5Widgets -ccopt 'Qt5Quick`' -ccopt -O2 -ccopt '-Dprivate=public' -c stubs.c
In file included from stubs.c:1:
./stubs.h:6:10: fatal error: 'QtWidgets/QApplication' file not found
#include <QtWidgets/QApplication>
         ^
1 error generated.
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:00.
E: Failure("Command ''/Users/andy/.opam/4.02.0+trunk/bin/ocamlbuild' liblablqml_stubs.a dlllablqml_stubs.so lablqml.cma lablqml.cmxa lablqml.a lablqml.cmxs -tag debug' terminated with error code 10")
make[1]: *** [build] Error 1
make: *** [lib] Error 2
Kakadu commented 10 years ago

I think that something is wrong with your Qt5 installation.... can you paste output of these commands?

➜  ukraine git:(neo) pkg-config --cflags Qt5Widgets
-I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include/QtWidgets -I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include -I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include/QtGui -I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include -I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include/QtCore -I/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include 
➜  ukraine git:(neo) pkg-config --libs Qt5Widgets
-L/home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core 
➜  ukraine git:(neo) ls -l /home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include/QtWidgets/QApplication
-rw-r--r-- 1 kakadu kakadu 26 Jun 19 17:08 /home/kakadu/mand/prog/qt/qt5.2/5.3/gcc_64/include/QtWidgets/QApplication
➜  ukraine git:(neo) qmake -query QT_VERSION
5.3.1
Kakadu commented 10 years ago

I hope https://github.com/Kakadu/lablqt/issues/16 is unrelated to this....

akovbovich commented 10 years ago
Ξ ~ → pkg-config --cflags Qt5Widgets
-I/Users/andy/Qt/5.3/clang_64/include/QtWidgets -I/Users/andy/Qt/5.3/clang_64/include -I/Users/andy/Qt/5.3/clang_64/include/QtGui -I/Users/andy/Qt/5.3/clang_64/include -I/Users/andy/Qt/5.3/clang_64/include/QtCore -I/Users/andy/Qt/5.3/clang_64/include
Ξ ~ → find ~/Qt -name QApplication -print
/Users/andy/Qt/5.3/android_armv7/include/QtWidgets/QApplication
/Users/andy/Qt/5.3/clang_64/lib/QtWidgets.framework/Versions/5/Headers/QApplication
/Users/andy/Qt/5.3/ios/include/QtWidgets/QApplication
Ξ ~ → pkg-config --libs Qt5Widgets
-F/Users/andy/Qt/5.3/clang_64/lib -framework QtWidgets -F/Users/andy/Qt/5.3/clang_64/lib -framework QtGui -F/Users/andy/Qt/5.3/clang_64/lib -framework QtCore
Ξ ~ → ls -l ~/Qt/5.3/clang_64/include/
total 0
drwxr-xr-x  8 andy  staff  272 19 июл 07:14 QtOpenGLExtensions
drwxr-xr-x  7 andy  staff  238 19 июл 07:14 QtPlatformSupport
drwxr-xr-x  9 andy  staff  306 19 июл 07:14 QtUiTools
Kakadu commented 10 years ago

It seems this bug is not fixed: https://bugreports.qt-project.org/browse/QTBUG-35256

They recommend to add -I${libdir}/QtWidgets.framework/Versions/5/Headers to .pc file. I don't have Mac, I can't test it or fix it, sorry man.

akovbovich commented 10 years ago
Cflags: -F${libdir} -framework QtWidgets
in /Users/andy/Qt/5.3/clang_64/lib/pkgconfig/Qt5Widgets.pc

does the trick

=-=-= Installing lablqt.0.3 =-=-=
Building lablqt.0.3:
  ./configure
  make generator
  bash -c cd lablqml && ./configure --datarootdir=/Users/andy/.opam/4.02.0+trunk/lib && make
  make opam.install
Installing lablqt.0.3.
Ξ ~ → ocamlfind query lablqml
/Users/andy/.opam/4.02.0+trunk/lib/lablqml
Kakadu commented 10 years ago

Good. Can I close this?

akovbovich commented 10 years ago

ok

Kakadu commented 10 years ago

I hope I will get some feedback about lablqt from you, Andrey :)

tutorial is there: http://kakadu.github.io/lablqt/tutorial2.html