gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
97 stars 35 forks source link

Are there detailed instructions for building this on MacOS? #129

Open Mantene opened 4 months ago

Mantene commented 4 months ago

I have tried and tried to build this on a Mac. I am a home-brew user, but apparently the only way to get a working version of code blocks is with macports, so I spun up an old Mac, wiped it and made it my development server. I got code blocks working. I got all of the dependencies installed as far as I can tell - FFmpeg, OpenAL, etc. Yet I keep hitting roadblocks when I run make.

It all seems to come to this every single time:

devuser@Documents/source/sview> make   

SRCDIR=/Users/devuser/Documents/source/sview
mkdir -p build/sView.app/Contents/MacOS/lang/English
mkdir -p build/sView.app/Contents/MacOS/lang/Español
mkdir -p build/sView.app/Contents/MacOS/lang/русский
mkdir -p build/sView.app/Contents/MacOS/lang/français
mkdir -p build/sView.app/Contents/MacOS/lang/Deutsch
mkdir -p build/sView.app/Contents/MacOS/lang/Czech
mkdir -p build/sView.app/Contents/MacOS/lang/ChineseS
mkdir -p build/sView.app/Contents/MacOS/lang/ChineseT
mkdir -p build/sView.app/Contents/MacOS/lang/Korean
mkdir -p build/sView.app/Contents/MacOS/textures
mkdir -p build/sView.app/Contents/MacOS/web
cp -f -r textures/* build/sView.app/Contents/MacOS/textures/
g++ -shared -Wl,-install_name,@executable_path/libStShared.dylib    -mmacosx-version-min=10.10 -Lbuild/sView.app/Contents/MacOS /Users/devuser/Documents/source/sview/StShared/StAVFrame.o /Users/devuser/Documents/source/sview/StShared/StAVIOContext.o /Users/devuser/Documents/source/sview/StShared/StAVIOFileContext.o /Users/devuser/Documents/source/sview/StShared/StAVIOJniHttpContext.o /Users/devuser/Documents/source/sview/StShared/StAVIOMemContext.o /Users/devuser/Documents/source/sview/StShared/StAVImage.o /Users/devuser/Documents/source/sview/StShared/StAVPacket.o /Users/devuser/Documents/source/sview/StShared/StAVVideoMuxer.o /Users/devuser/Documents/source/sview/StShared/StAction.o /Users/devuser/Documents/source/sview/StShared/StBndBox.o /Users/devuser/Documents/source/sview/StShared/StBndCameraBox.o /Users/devuser/Documents/source/sview/StShared/StBndSphere.o /Users/devuser/Documents/source/sview/StShared/StCondition.o /Users/devuser/Documents/source/sview/StShared/StConfigImpl.o /Users/devuser/Documents/source/sview/StShared/StDevILImage.o /Users/devuser/Documents/source/sview/StShared/StDictionary.o /Users/devuser/Documents/source/sview/StShared/StEDIDParser.o /Users/devuser/Documents/source/sview/StShared/StExifDir.o /Users/devuser/Documents/source/sview/StShared/StExifTags.o /Users/devuser/Documents/source/sview/StShared/StFTFont.o /Users/devuser/Documents/source/sview/StShared/StFTFontRegistry.o /Users/devuser/Documents/source/sview/StShared/StFTLibrary.o /Users/devuser/Documents/source/sview/StShared/StFileNode.o /Users/devuser/Documents/source/sview/StShared/StFileNode2.o /Users/devuser/Documents/source/sview/StShared/StFolder.o /Users/devuser/Documents/source/sview/StShared/StFormatEnum.o /Users/devuser/Documents/source/sview/StShared/StFreeImage.o /Users/devuser/Documents/source/sview/StShared/StGLCircle.o /Users/devuser/Documents/source/sview/StShared/StGLContext.o /Users/devuser/Documents/source/sview/StShared/StGLFont.o /Users/devuser/Documents/source/sview/StShared/StGLFontEntry.o /Users/devuser/Documents/source/sview/StShared/StGLFontManager.o /Users/devuser/Documents/source/sview/StShared/StGLFrameBuffer.o /Users/devuser/Documents/source/sview/StShared/StGLMatrix.o /Users/devuser/Documents/source/sview/StShared/StGLMesh.o /Users/devuser/Documents/source/sview/StShared/StGLPrism.o /Users/devuser/Documents/source/sview/StShared/StGLProgram.o /Users/devuser/Documents/source/sview/StShared/StGLProjCamera.o /Users/devuser/Documents/source/sview/StShared/StGLQuadTexture.o /Users/devuser/Documents/source/sview/StShared/StGLQuads.o /Users/devuser/Documents/source/sview/StShared/StGLResource.o /Users/devuser/Documents/source/sview/StShared/StGLShader.o /Users/devuser/Documents/source/sview/StShared/StGLStereoFrameBuffer.o /Users/devuser/Documents/source/sview/StShared/StGLTextFormatter.o /Users/devuser/Documents/source/sview/StShared/StGLTexture.o /Users/devuser/Documents/source/sview/StShared/StGLTextureData.o /Users/devuser/Documents/source/sview/StShared/StGLTextureQueue.o /Users/devuser/Documents/source/sview/StShared/StGLUVCylinder.o /Users/devuser/Documents/source/sview/StShared/StGLUVSphere.o /Users/devuser/Documents/source/sview/StShared/StGLVertexBuffer.o /Users/devuser/Documents/source/sview/StShared/StImage.o /Users/devuser/Documents/source/sview/StShared/StImageFile.o /Users/devuser/Documents/source/sview/StShared/StImagePlane.o /Users/devuser/Documents/source/sview/StShared/StJNIEnv.o /Users/devuser/Documents/source/sview/StShared/StJpegParser.o /Users/devuser/Documents/source/sview/StShared/StLangMap.o /Users/devuser/Documents/source/sview/StShared/StLibrary.o /Users/devuser/Documents/source/sview/StShared/StLogger.o /Users/devuser/Documents/source/sview/StShared/StMinGen.o /Users/devuser/Documents/source/sview/StShared/StMonitor.o /Users/devuser/Documents/source/sview/StShared/StMsgQueue.o /Users/devuser/Documents/source/sview/StShared/StMutex.o /Users/devuser/Documents/source/sview/StShared/StPlayList.o /Users/devuser/Documents/source/sview/StShared/StProcess.o /Users/devuser/Documents/source/sview/StShared/StProcess2.o /Users/devuser/Documents/source/sview/StShared/StRawFile.o /Users/devuser/Documents/source/sview/StShared/StRegisterImpl.o /Users/devuser/Documents/source/sview/StShared/StResourceManager.o /Users/devuser/Documents/source/sview/StShared/StSettings.o /Users/devuser/Documents/source/sview/StShared/StStbImage.o /Users/devuser/Documents/source/sview/StShared/StThread.o /Users/devuser/Documents/source/sview/StShared/StTranslations.o /Users/devuser/Documents/source/sview/StShared/StVirtualKeys.o /Users/devuser/Documents/source/sview/StShared/stAV.o /Users/devuser/Documents/source/sview/StShared/stConsole.o /Users/devuser/Documents/source/sview/StShared/stUtfTools.o /Users/devuser/Documents/source/sview/StShared/StCocoaCoords.o /Users/devuser/Documents/source/sview/StShared/StCocoaLocalPool.o /Users/devuser/Documents/source/sview/StShared/StFileNode.ObjC.o /Users/devuser/Documents/source/sview/StShared/StLogger.ObjC.o /Users/devuser/Documents/source/sview/StShared/StPListImpl.o /Users/devuser/Documents/source/sview/StShared/StSocket.ObjC.o /Users/devuser/Documents/source/sview/StShared/StStringUnicode.ObjC.o  -framework OpenGL -framework Appkit   -lavutil -lavformat -lavcodec -lswscale -lfreetype  -lobjc -o build/sView.app/Contents/MacOS/libStShared.dylib

ld: library 'avutil' not found

clang++: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [libStShared.dylib] Error 1

I know FFMPEG is installed and libavcodec, libavdevice, libavfilter, libavformat, and libavutil should all be where it can find them. What am I missing? What can I do?

gkv311 commented 2 months ago

Either you provide variables like FFMPEG_ROOT to Makefile with custom location of FFmpeg and other libraries, or consider they to be installed global-wise in default location, available to building tools.

The automatic build on GitHub Actions relies on homebrew - see continuousIntegration/build_sview_osx.sh and .github/workflows/build_macos_12.yml. But I don't know if produced application is actually usable.