我试图在我的Mac上构建并运行dragonegg。使用LLVM 3.5和gcc 4.8,来自自制软件包管理器。
根据自述文件(GCC=/usr/local/bin/gcc-4.8 LLVM_CONFIG=/usr/local/bin/llvm-config-3.5 make
)编译dragonegg以此错误结束:
Compiling Cache.cpp
/Users/aelberg/Development/dragonegg-3.5.0.src/src/Cache.cpp:243:15: error: no matching function for call to 'operator new'
WeakVH *W = new (&(*slot)->V) WeakVH(V);
^ ~~~~~~~~~~~~~
note: candidate function not viable: requires 1 argument, but 2 were provided
1 error generated.
make: *** [Cache.o] Error 1
这似乎与libc ++与libstdc ++问题有关,这些问题在mac上编译时遇到了问题。并且dragonegg 将使用GCC=/usr/local/bin/gcc-4.8 LLVM_CONFIG=/usr/local/bin/llvm-config-3.5 LDFLAGS="-L/usr/local/lib/ -L/usr/lib -L/usr/local/lib/llvm-3.5/usr/lib" CXX="/usr/local/bin/clang++-3.5 -stdlib=libc++" CXXFLAGS="-I/usr/local/lib/llvm-3.5/include/c++/v1" make
然而,当我尝试使用dragonegg编译任何东西时,我得到了一组不幸的错误:
$ /usr/local/bin/gcc-4.8 -fplugin=/usr/local/lib/dragonegg_483_35.so hello.c
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:2:Unknown pseudo-op: .macosx_version_min
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:2:Rest of line ignored. 1st junk character valued 49 (1).
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:9:Unknown pseudo-op: .cfi_startproc
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:12:Unknown pseudo-op: .cfi_def_cfa_offset
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:12:Rest of line ignored. 1st junk character valued 49 (1).
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:14:Unknown pseudo-op: .cfi_offset
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:14:Rest of line ignored. 1st junk character valued 37 (%).
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:17:Unknown pseudo-op: .cfi_def_cfa_register
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:17:Rest of line ignored. 1st junk character valued 37 (%).
/var/folders/s1/_v14lsc56tv44hm304m07vn40000gq/T//ccPKylId.s:72:Unknown pseudo-op: .cfi_endproc
$ /usr/local/bin/gcc-4.8 hello.c
$ ./a.out
Hello World
显然,这似乎不太可能涉及用于创建dragonegg的编译器标志中的任何设置,因为它们都与C ++有关。
有什么建议吗?
答案 0 :(得分:1)
我找到的解决方案是通过添加-specs=[path to integrated=as.specs]
告诉dragonegg使用llvm的汇编程序而不是系统汇编程序。根据dragonegg的文档,这既不是必要的,也不是必须的,但确实如此。