wangqr / Aegisub

Win64 nightly builds available at GHA artifact, also at following link:
https://ftp.wangqr.tk/aegisub/
Other
788 stars 48 forks source link

CMake building with issue: Boost_CHRONO_LIBRARY NOT FOUND #35

Open Cyame opened 4 years ago

Cyame commented 4 years ago

I'm trying to make a custom building in OS X yet it doesn't work with no boost_chrono_library.

logs: `//Value Computed by CMake Aegisub_BINARY_DIR:STATIC=/Users/Marlon/documents/Aegisub-dev/build-dir

//Value Computed by CMake Aegisub_SOURCE_DIR:STATIC=/Users/Marlon/documents/Aegisub-dev

//Boost chrono library (debug) Boost_CHRONO_LIBRARY_DEBUG:FILEPATH=Boost_CHRONO_LIBRARY_DEBUG-NOTFOUND

//Boost chrono library (release) Boost_CHRONO_LIBRARY_RELEASE:FILEPATH=Boost_CHRONO_LIBRARY_RELEASE-NOTFOUND

//The directory containing a CMake configuration file for Boost. Boost_DIR:PATH=Boost_DIR-NOTFOUND

//Boost filesystem library (debug) Boost_FILESYSTEM_LIBRARY_DEBUG:FILEPATH=Boost_FILESYSTEM_LIBRARY_DEBUG-NOTFOUND

//Boost filesystem library (release) Boost_FILESYSTEM_LIBRARY_RELEASE:FILEPATH=Boost_FILESYSTEM_LIBRARY_RELEASE-NOTFOUND

//Path to a file. Boost_INCLUDE_DIR:PATH=Boost_INCLUDE_DIR-NOTFOUND

//Boost locale library (debug) Boost_LOCALE_LIBRARY_DEBUG:FILEPATH=Boost_LOCALE_LIBRARY_DEBUG-NOTFOUND

//Boost locale library (release) Boost_LOCALE_LIBRARY_RELEASE:FILEPATH=Boost_LOCALE_LIBRARY_RELEASE-NOTFOUND

//Boost regex library (debug) Boost_REGEX_LIBRARY_DEBUG:FILEPATH=Boost_REGEX_LIBRARY_DEBUG-NOTFOUND

//Boost regex library (release) Boost_REGEX_LIBRARY_RELEASE:FILEPATH=Boost_REGEX_LIBRARY_RELEASE-NOTFOUND

//Boost system library (debug) Boost_SYSTEM_LIBRARY_DEBUG:FILEPATH=Boost_SYSTEM_LIBRARY_DEBUG-NOTFOUND

//Boost system library (release) Boost_SYSTEM_LIBRARY_RELEASE:FILEPATH=Boost_SYSTEM_LIBRARY_RELEASE-NOTFOUND

//Boost thread library (debug) Boost_THREAD_LIBRARY_DEBUG:FILEPATH=Boost_THREAD_LIBRARY_DEBUG-NOTFOUND

//Boost thread library (release) Boost_THREAD_LIBRARY_RELEASE:FILEPATH=Boost_THREAD_LIBRARY_RELEASE-NOTFOUND

//Path to a program. CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND

//Path to a program. CMAKE_AR:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ar

//Choose the type of build, options are: None Debug Release RelWithDebInfo // MinSizeRel ... CMAKE_BUILD_TYPE:STRING=

//Enable/Disable color output during build. CMAKE_COLOR_MAKEFILE:BOOL=ON

//CXX compiler CMAKE_CXX_COMPILER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/c++

//Flags used by the CXX compiler during all build types. CMAKE_CXX_FLAGS:STRING=

//Flags used by the CXX compiler during DEBUG builds. CMAKE_CXX_FLAGS_DEBUG:STRING=-g

//Flags used by the CXX compiler during MINSIZEREL builds. CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the CXX compiler during RELEASE builds. CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the CXX compiler during RELWITHDEBINFO builds. CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//C compiler CMAKE_C_COMPILER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/cc

//Flags used by the C compiler during all build types. CMAKE_C_FLAGS:STRING=

//Flags used by the C compiler during DEBUG builds. CMAKE_C_FLAGS_DEBUG:STRING=-g

//Flags used by the C compiler during MINSIZEREL builds. CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

//Flags used by the C compiler during RELEASE builds. CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

//Flags used by the C compiler during RELWITHDEBINFO builds. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

//Path to a program. CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND

//Executable file format CMAKE_EXECUTABLE_FORMAT:STRING=MACHO

//Flags used by the linker during all build types. CMAKE_EXE_LINKER_FLAGS:STRING=

//Flags used by the linker during DEBUG builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during MINSIZEREL builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during RELEASE builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during RELWITHDEBINFO builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Enable/Disable output of compile commands during generation. CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF

//Path to a program. CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool

//Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/usr/local

//Path to a program. CMAKE_LINKER:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ld

//Path to a program. CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make

//Flags used by the linker during the creation of modules during // all build types. CMAKE_MODULE_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of modules during // DEBUG builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of modules during // MINSIZEREL builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of modules during // RELEASE builds. CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of modules during // RELWITHDEBINFO builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program. CMAKE_NM:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/nm

//Path to a program. CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND

//Path to a program. CMAKE_OBJDUMP:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/objdump

//Build architectures for OSX CMAKE_OSX_ARCHITECTURES:STRING=

//Minimum OS X version to target for deployment (at runtime); newer // APIs weak linked. Set to empty string for default value. CMAKE_OSX_DEPLOYMENT_TARGET:STRING=

//The product will be built against the headers and libraries located // inside the indicated SDK. CMAKE_OSX_SYSROOT:PATH=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

//Value Computed by CMake CMAKE_PROJECT_DESCRIPTION:STATIC=

//Value Computed by CMake CMAKE_PROJECT_HOMEPAGE_URL:STATIC=

//Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=Aegisub

//Path to a program. CMAKE_RANLIB:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/ranlib

//Path to a program. CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND

//Flags used by the linker during the creation of shared libraries // during all build types. CMAKE_SHARED_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of shared libraries // during DEBUG builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of shared libraries // during MINSIZEREL builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of shared libraries // during RELEASE builds. CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of shared libraries // during RELWITHDEBINFO builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries // during all build types. CMAKE_STATIC_LINKER_FLAGS:STRING=

//Flags used by the linker during the creation of static libraries // during DEBUG builds. CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of static libraries // during MINSIZEREL builds. CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of static libraries // during RELEASE builds. CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of static libraries // during RELWITHDEBINFO builds. CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//Path to a program. CMAKE_STRIP:FILEPATH=/Library/Developer/CommandLineTools/usr/bin/strip

//If this value is on, makefiles will be generated without the // .SILENT directive, and all commands will be echoed to the console // during the make. This is useful for debugging only. With Visual // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Path to a file. Fontconfig_INCLUDE_DIR:PATH=/usr/local/Cellar/fontconfig/2.13.1/include

//Path to a library. Fontconfig_LIBRARY:FILEPATH=/usr/local/lib/libfontconfig.dylib

//pkg-config executable PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/local/bin/pkg-config

//Whether show build credit in about dialog WITH_BUILD_CREDIT:BOOL=OFF

//Path to a file. ass_INCLUDE_DIRS:PATH=/usr/local/Cellar/libass/0.14.0_1/include

//Path to a library. ass_LIBRARIES:FILEPATH=/usr/local/Cellar/libass/0.14.0_1/lib/libass.dylib

//Path to a library. pkgcfg_lib_PC_ass_ass:FILEPATH=/usr/local/Cellar/libass/0.14.0_1/lib/libass.dylib

//Path to a library. pkgcfg_lib_PKG_FONTCONFIG_fontconfig:FILEPATH=/usr/local/Cellar/fontconfig/2.13.1/lib/libfontconfig.dylib

//Path to a library. pkgcfg_lib_PKG_FONTCONFIG_freetype:FILEPATH=/usr/local/opt/freetype/lib/libfreetype.dylib ` Could you provide a OS X release at the version of 3.3.0? Or could you tell me whether I could build it by myself. Great thanks!

wangqr commented 4 years ago

You need to install libboost (and other dependencies) first. See https://github.com/Aegisub/Aegisub#os-x for instructions. wxWidgets can also be installed via brew install --devel wxmac, if you don't want to build it from source.

Although I provided CMake project files, the orginal configure && make approach is still the recommended way of building on macOS, as I haven't tested CMake build on macOS.

Unfortunately I don't have an Apple device, therefore I cannot provide a binary release for macOS.

Cyame commented 4 years ago

Thanks for this promptly instruction! I'll try it out and report capability if it works in this thread.

By the way, another quick question. In version both r8972 and 3.3.0, it will raise an error when executing _G.unicode.len(orgline.text_stripped:gsub(",")) in a code line. I'd like to know if it is because of the upgrading of the Lua and Runtime Env? And how could I use this command when "decreasing a parameter"(It's said need only one parameter but two)?

wangqr commented 4 years ago

Can you paste the error message? From Lua manual,

The string.gsub (Global Substitution) function has three parameters: a subject string, a pattern, and a replacement string.

But in your code you only provided 2 arguments (subject string is orgline.text_stripped, and second parameter is ","). You need an extra string as parameter.

Cyame commented 4 years ago

The debug info would be like:

Runtime error in template code: Expected 1 arguments, got 2 Code producing error: ci = { 0,0,0,0,0,0,0 }; cn = _G.unicode.len(orgline.text_stripped:gsub(" ",""))

However, this is a line grabbed from a template written by others... and it could be successfully itexecuted in the version of 3.2.0 actually. So I'm wondering if the standard is changed... or how could I fix it.

wangqr commented 4 years ago

Oh that make sense now. Can you try if this works:

cn = _G.unicode.len( ( orgline.text_stripped:gsub(" ","") ) )

Notice the extra pair of parentheses around gsub.

Since lua 3.2,

(gsub) Returns a copy of s, where all occurrences of the pattern pat have been replaced by a replacement string specified by repl. This function also returns, as a second value, the total number of substitutions made.

Cyame commented 4 years ago

Yeah it works!! Really appreciate it!

wangqr commented 4 years ago

I've updated the README to be more clear on which packages are needed and how to build on macOS, just in case you are interested.

Cyame commented 4 years ago

Great appreciate to your tutorial and great helps! I've already build a release following your instrustions. It seems pretty well, however, everything goes well excpet for the toolbar. I mean the upper one with the file, edit, and etc. It got stucked first, and turns good at the second try... I'm quite confused about how it could be like that? Do you have any idea? What's more, there seems no automation tools in the library. Do I need to manually plugin? Or there's something I did wrong. By the way, I have had a hard time using some mods like VSFilterMod in OS X system. I've asked someone else for help and got "there's almost no way to use .dll as library in OS X". So is there any alternative solution? Thank you again and wish you all the best!

wangqr commented 4 years ago

It got stucked first, and turns good at the second try...

I've faced this issue before when running src/aegisub binary directly. If that is the case, you can try running make osx-bundle after make (this will create the app folder) and start (double click) the app from finder.

What's more, there seems no automation tools in the library.

LuaJIT v2.0.x does not work on 64-bit macos. I've merged that LuaJIT update a few days ago (52032dc14b30718172fac01a5e6d5f242057c0b3), so if you've cloned this repo earlier, try pull the new commits.

I've asked someone else for help and got "there's almost no way to use .dll as library in OS X".

There's no alternative solution, unless the VSFilterMod author decided to port it to mac. Using Windows is the only way now. There was some effort by AviSynth / VapourSynth developer to run it under wine on *nix systems, but IIRC they didn't go very far and it is not usable.

wangqr commented 4 years ago

There was another issue with wxMac 3.0.x. I've just documented that on the project wiki

Cyame commented 4 years ago

I've faced this issue before when running src/aegisub binary directly. If that is the case, you can try running make osx-bundle after make (this will create the app folder) and start (double click) the app from finder.

So did I run the binary version lol; And it works well after bundled! Thanks! For the rest two, actually I did know AvS could be runned in wine env, but it still not convenient to work on. You know that sometimes we need to write some Lua effects, and we need both VSFilterMod and automation. I think it's better to work in a virtual Windows environment on MBP. Thank you so far:)

Cyame commented 4 years ago

There was another issue with wxMac 3.0.x. I've just documented that on the project wiki

Got it. I will try fixing it afterwards!