Skip to content

Instantly share code, notes, and snippets.

@Kirkman
Last active December 20, 2018 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kirkman/06db0a189272d482464a32ea1e9cefa1 to your computer and use it in GitHub Desktop.
Save Kirkman/06db0a189272d482464a32ea1e9cefa1 to your computer and use it in GitHub Desktop.
Get SBBS to compile on a Mac

Make sure you're using homebrew for adding libraries like nspr.

  1. Need to specify clang so that SpiderMonkey will compile

    CC=clang CXX=clang++ make install SYMLINK=1
    
  2. Required for SpiderMonkey versions older than 28

    brew install nspr
    
  3. To avoid the "object file XXXXXX was built for newer OSX version (10.13) than being linked (10.11)" errors, type the following on the command line:

    export MACOSX_DEPLOYMENT_TARGET=10.13
    
  4. Comment out line 73 of /src/conio/Common.gmake to avoid "unknown option character `W' in: -Wl,-rpath,@executable_path/../Frameworks"

  5. Next, remove -lcc_dynamic from lines 91-92 of /src/sbbs3/GNUMakefile:

     MKSHLIB		:=	libtool -dynamic -framework System
     MKSHPPLIB		:=	libtool -dynamic -framework System -lstdc++
    

    (include -v if you want debugging output)

  6. Fix duplicate symbol errors.

    Add "extern" to lines 225-226 of sbbsecho.h

    extern char* pktTypeStringList[PKT_TYPES_SUPPORTED+1];
    extern char* mailStatusStringList[4];
    

    Add "extern" to line 103 of scfg.h

    extern char* area_sort_desc[AREA_SORT_TYPES+1];
    
  7. Fix library directories

    Prepend "$(SRC_ROOT)$(DIRSEP)sbbs3$(DIRSEP)" to "$@" for each library in GNUmakefile. Lines 120, 125, 130, 135, 140

    Example from Line 120:

    	$(QUIET)$(MKSHPPLIB) $(LDFLAGS) -o $(SRC_ROOT)$(DIRSEP)sbbs3$(DIRSEP)$@ $(OBJS) $(SBBS_LIBS) $(LIBS) $(SHLIBOPTS) $(JS_LIBS) $(CRYPT_LIBS) $(XPDEV-MT_LIBS) -lsmb
    
  8. After compiling, to make symlinks, use these Mac-specific commands in /sbbs/exec/

    ln -s ../src/sbbs3/clang.*.exe.release/* .
    ln -s ../src/sbbs3/*/clang.*.exe.release/* .
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment