在OS X Lion上使用Clozure CL不能正常工作

时间:2012-07-11 14:10:41

标签: qt osx-lion common-lisp ccl quicklisp

我想在OS X Lion上使用Clozure CL使用Commonqt。

但它没有用......

Commonqt

  

Commonqt是一个与Qt烟雾库绑定的Common Lisp。

     

http://common-lisp.net/project/commonqt/

我的设置是

  

OS X Lion 10.7.4

     

Xcode 4.3.3

     

Clozure CL 1.8版

     

qt 4.8.2(git clone git://gitorious.org/qt/qt.git)“./ configure&& make install&& make”

     

     
      
  • somkegen(git clone git://anongit.kde.org/smokegen)“cmake。&& make install”
  •   
  • smokeqt(git clone git://anongit.kde.org/smokeqt)“cmake。&& make install”
  •   
     

quicklisp

     
      
  • local-projects commonqt(git clone git://gitorious.org/commonqt/commonqt.git)“qmake&& make clean&& make”
  •   
     

cf:http://kvardek-du.kerno.org/2011/12/setting-up-commonqt-on-osx.html

qt.asd(在Commonqt中)

(defmethod output-files ((operation compile-op) (c cpp->so))   (values
    (loop for filename in '("libcommonqt.so" "libcommonqt.so.1"
                            "libcommonqt.so.1.0" "libcommonqt.so.1.0.0")
          collect (merge-pathnames filename (component-pathname c)))
    ;; libcommonqt.so* files are never moved to separate FASL directory
    t))

所以我被改变了(所以 - > dylib)

(defmethod output-files ((operation compile-op) (c cpp->so))   (values
    (loop for filename in '("libcommonqt.dylib" "libcommonqt.1.dylib"
                            "libcommonqt.1.0.dylib" "libcommonqt.1.0.0.dylib")
          collect (merge-pathnames filename (component-pathname c)))
    ;; libcommonqt.so* files are never moved to separate FASL directory
    t))

但是发生了错误。例如

源代码

http://pleasegodno.wordpress.com/common-lisp-tutorials/common-lisp-gui-programming-with-commonqt/2-classes-and-methods/

? (main)
MAIN
? > Error: Unable to load foreign library (LIBCOMMONQT.DYLIB-31136).
>          Error opening shared library /Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib : dlopen(/Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib, 10): no suitable image found.  Did find:
>           /Users/jk/.quicklisp/local-projects/commonqt/libcommonqt.dylib: mach-o, but wrong architecture.
> While executing: CFFI::FL-ERROR, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > 

这是我的错误设置吗?或者,在OS X Lion上使用Clozure Cl时,Commonqt的源是不能正常工作的吗?

接下来,我该怎么办?

user1234192的建议:ccl - > ccl64

我重试了。

> (qt-conv:main)
2012-07-12 21:46:11.630 dx86cl64[93621:c403] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
2012-07-12 21:46:11.631 dx86cl64[93621:c403] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2012-07-12 21:46:11.633 dx86cl64[93621:c403] (
    0   CoreFoundation                      0x00007fff8dc49f56 __exceptionPreprocess + 198
    1   libobjc.A.dylib                     0x00007fff9600dd5e objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8dc49d8a +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff8de4671f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169
    4   Foundation                          0x00007fff8ddb595f +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144
    5   AppKit                              0x00007fff8b15a0ef -[NSApplication run] + 596
    6   QtGui                               0x000000000346cc60 _ZN19QEventDispatcherMac13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE + 840
    7   QtCore                              0x0000000004122838 _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE + 394
    8   QtCore                              0x0000000004125b0b _ZN16QCoreApplication4execEv + 175
    9   libsmokeqtgui.dylib                 0x00000000043718e1 _ZN12__smokeqtgui14x_QApplication4x_84EPN5Smoke9StackItemE + 17
    10  libsmokeqtgui.dylib                 0x00000000043579d8 _ZN12__smokeqtgui18xcall_QApplicationEsPvPN5Smoke9StackItemE + 1304
    11  dx86cl64                            0x000000000001b0db SPffcall + 99
    12  ???                                 0x0000000001219328 0x0 + 18977576
)
2012-07-12 21:46:11.634 dx86cl64[93621:c403] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.25/Misc.subproj/NSUndoManager.m:324
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

Unhandled exception 10 at 0x0, context->regs at #xb029af30
Exception occurred while executing foreign code
received signal 10; faulting address: 0x0
? for help
[93621] Clozure CL kernel debugger: help
[93621] Clozure CL kernel debugger: [93621] Clozure CL kernel debugger: [93621] Clozure CL kernel debugger: Segmentation fault: 11

2 个答案:

答案 0 :(得分:3)

http://kvardek-du.kerno.org/2011/12/setting-up-commonqt-on-osx.html

我在clozure cl(Lion)上取得了成功

和...你的错误信息..“libcommonqt.dylib:mach-o,但错误的架构”

也许..你的ccl和libcommonqt.dylib是不同的架构。

如果你的ccl是x86(32位),libcommonqt.dylib必须是x86。

如果您的ccl是x8664(64位),则libcommonqt.dylib必须是x8664 ...

我推荐64位。

我的英语非常难看。遗憾.......

答案 1 :(得分:0)

尝试

(ql:quickload:trivial-main-thread) (trivial-main-thread:call-in-main-thread#' qt-conv:main)