Closed ValeryKV closed 5 years ago
@ValeryKV, you may need to roll back the changes in the earlier commit: 244c5f157619522101b7c0346605daedaeafae8f. It was done to fix the conflict with stdlib
for compilers supporting c++11. If both (old and new) compilers need to be supported, then the check needs to be updated to only get activated for a specific version of xcode, but I'm not sure how to describe that in cmake.
I rolled back the commit and all completed successfully. The error is in linking now:
make[2]: *** No rule to make target `.../wxWidgets-3.0.4/build_osxu/lib/libwx_osx_cocoau_media-3.0.a', needed by `lib/Release/libwx.dylib'. Stop.
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make: *** [all] Error 2
I configured wxWidgets with --disable-mediactrl. Otherwise it is not compiled. I cannot find the issue about it, but as workaround they advised to add this flag.
What can I do to fix linking?
@ValeryKV, what's the content of the lib
folder where the missing library is expected to be? I suspect it may be a name mismatch; for example, you may find libwxmedia-3.0.a
in that folder instead of libwx_osx_cocoau_media-3.0.a
. I've seen this happening with libwxscintilla
, but I haven't used mediactrl, so can't be sure.
@pkulchenko, I had to guess. I compiled wxWidgets with "--disable-mediactrl" and it did not build media library. I remove 'media' from wxLuaBind_COMPONENTS and wxWidgets_COMPONENTS and regenerated files. Now make
shows many link errors Undefined symbols for architecture x86_64
:
...
"_lua_xmove", referenced from:
wxLuaState::lua_XMove(wxLuaState const&, int) in wxlstate.cpp.o
"_lua_yieldk", referenced from:
wxLuaState::lua_Yield(int) in wxlstate.cpp.o
"_luaopen_bit32", referenced from:
wxLuaState::Create(lua_State*, int) in wxlstate.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/Release/libwx.dylib] Error 1
make[1]: *** [modules/luamodule/CMakeFiles/wxLuaModule.dir/all] Error 2
make: *** [all] Error 2
How can I fix that?
Now make shows many link errors Undefined symbols for architecture x86_64
This looks like build errors on a mixed (not clean) build. Try running the following before rebuilding from wxlua/wxLua
folder: make clean; git checkout .; git clean -fd
(the last command will remove all files that are not in the repo, so if you have any new files or modifications you need, save them).
@pkulchenko, here are my steps:
1. git clone to new location.
2. rollback #244c5f1.
3. configure and generate to new clean location.
4. run 'make'.
The error is the same. It seems that the linker requires lib/Release/libwx.dylib
. But my Release
folder contains:
libwxlua-wx30osx_cocoau-3.0.0.3.dylib
libwxlua_bind-wx30osx_cocoau-3.0.0.3.dylib
libwxlua_debug-wx30osx_cocoau-3.0.0.3.dylib
libwxlua_debugger-wx30osx_cocoau-3.0.0.3.dylib
libwxlua_lua52-wx30osx_cocoau-3.0.0.3.dylib
what's your full configure
call?
Do you mean configure for wxWidgets? I attached the output of cmake output.txt .
I mean the configure
command itself. Did you pass any parameters to it?
I did not run configure
for wxLua
, only for wxWidgets
. All my cmake-gui settings are attached.
BTW. I did not find liblua.a/dylib inside my build folder. I have many compiled .o files, but there is no the library. Does it matter?
@ValeryKV, I don't see anything wrong with the settings. BTW, linker can't require lib/Release/libwx.dylib
, as it's going to build that library.
Closing as the current master branch builds on macOS without issues.
If you still have the problem, can you check if your configuration builds against wxwidgets 3.1? Are you required to use 3.0.4?
My env: macOS 10.13.6, Xcode 9.4.1, wxWidgets 3.0.4, wxLua 3.0 (master)
I followed the steps from https://github.com/pkulchenko/wxlua/blob/master/wxLua/docs/install.txt. I built wxWidgets as release, unicode, without (mediactrl).
Here is the error:
Here are all type_traits I have:
I do not know why
/opt/local/include/gcc/c++
is not included in the compilation. Should I provide other information that may help to fix it?I also tried to install wxWidgets & wxLua using macport and it works. It installs shared libs for wxWidgets-3.0 and wxLua 2.8. But I also want to build wxLua 3.0 and static libs.