gtDMMB / RNAStructViz

Visualization, comparison, and analysis of RNA secondary structures via a cross-platform GUI
https://github.com/gtDMMB/RNAStructViz/wiki
GNU General Public License v3.0
17 stars 5 forks source link

RNAStructViz does not install on macOS 10.12.6 #42

Closed BinXu18 closed 5 years ago

BinXu18 commented 5 years ago

Hi RNAStructViz developers, I am writing to report an issue with installation. I tried brew install gtDMMB/core/RNAStructViz. Below is the error message.

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN. g++ ../scripts/pkg-config-flags.sh --cflags /usr/local/opt/fltkwithcairo/bin/fltk-config --use-gl --use-images --use-glut --use-forms --use-cairo --cxxflags -std=gnu++17 -DFLTK_HAVE_CAIRO -DFLTKSTATIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -funsigned-char -g -Wall -Wextra -pedantic -O0 -march=native -Wno-c++11-narrowing -Wno-c++17-narrowing -c DiagramWindow.cpp error: invalid value 'gnu++17' in '-std=gnu++17' error: invalid value 'gnu++17' in '-std=gnu++17' error: invalid value 'gnu++17' in '-std=gnu++17' make[1]: [ConfigParser.o] Error 1 make[1]: Waiting for unfinished jobs.... make[1]: [BranchTypeIdentification.o] Error 1 make[1]: [CairoDrawingUtils.o] Error 1 error: invalid value 'gnu++17' in '-std=gnu++17' make[1]: [DiagramWindow.o] Error 1 make: [install] Error 2

I tried to install RNAStructViz from source. Below is the error message.

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN. g++ -isystem ../scripts/pkg-config-flags.sh --cflags /fltk-config --use-gl --use-images --use-glut --use-forms --use-cairo --cxxflags -std=gnu++17 -DFLTK_HAVE_CAIRO -DFLTKSTATIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -funsigned-char -g -Wall -Wextra -pedantic -O0 -march=native -Wno-c++11-narrowing -Wno-c++17-narrowing -c BranchTypeIdentification.cpp /bin/sh: /fltk-config: No such file or directory g++: error: unrecognized command line option ‘-Qunused-arguments’ g++: error: unrecognized command line option ‘-std=gnu++17’ make[1]: [BranchTypeIdentification.o] Error 1 make: [default] Error 2

How shall I fix the issue?

Thanks, Bin

maxieds commented 5 years ago

Hello @BinXu18

It appears that your version of Apple's stock xcode is out of date. You can try to update your version of xcode using this procedure. Alternately, you can try installing a more recent version of gcc using brew. The trick with using brew is to make sure that the new version of gcc is in the path where brew is expecting to find it. See here for how to do that.

maxieds commented 5 years ago

@BinXu18

Please let me know if this resolves the issue. Also please post your work arounds for the benefit of other users who may run into the same problems.

BinXu18 commented 5 years ago

Thank you for the information. My Xcode version is 9.2. The latest Xcode version requires Mac OS 10.14. So I proceeded to install gcc 9.1.0 using brew. I followed the trick to create aliases. (I modified the code by changing gcc-4.8 to gcc-9.1). Then I tried to brew install gtDMMB/core/RNAStructViz. There is one issue; see below.

bins-mbp:~ bin$ brew install gtDMMB/core/RNAStructViz ==> Installing rnastructviz from gtdmmb/core ==> Downloading https://github.com/gtDMMB/RNAStructViz/archive/v1.6.4-testing.ta Already downloaded: /Users/bin/Library/Caches/Homebrew/downloads/dd5835dd977d6a90392fad479d505f87690a97c8d1279cfc0ebf2d85d1682671--RNAStructViz-1.6.4-testing.tar.gz ==> make clean ==> make install INSTALL_PREFIX=/usr/local/Cellar/rnastructviz/v1.6.4-testing_1 Last 15 lines from /Users/bin/Library/Logs/Homebrew/rnastructviz/02.make: BuildFLTKConfig().c_str(),
CairoVersionString().c_str(), BuildPlatform().c_str(), LocalBuildDateTime().c_str()); const char *bugReportMsg = "Please include a screenshot along with this information in any bug report you submit. New issues with the application can be submitted at https://github.com/gtDMMB/RNAStructViz/issues."; fprintf(whichOut, "BUG REPORT INFORMATION:\n%s\n", bugReportMsg); }

};

endif

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN.

make: *** [install] Error 2

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core): https://github.com/gtdmmb/homebrew-core/issues

maxieds commented 5 years ago

@BinXu18 There is a new version of RNAStructViz available as of today. Try to run the following commands:

brew update
brew reinstall gtdmmb/core/rnastructviz
maxieds commented 5 years ago

@BinXu18 You can also try a from-source install if you can get a couple of the "easy" brew helper packages installed. Try running this:

brew reinstall gtdmmb/core/fltkwithcairo
brew reinstall gtdmmb/core/viennarna
git clone https://github.com/gtDMMB/RNAStructViz.git
cd RNAStructViz
make clean && make
sudo make install

Then you should be able to run the application by typing RNAStructViz at your terminal.

BinXu18 commented 5 years ago

Thank you for the update. I tried to run "brew reinstall gtdmmb/core/rnastructviz". I got some error message.

50-204-251-125-static:~ bin$ brew reinstall gtdmmb/core/rnastructviz ==> Reinstalling gtdmmb/core/rnastructviz ==> Downloading https://github.com/gtDMMB/RNAStructViz/archive/v1.6.5-testing.ta Already downloaded: /Users/bin/Library/Caches/Homebrew/downloads/7943f3df2e50ab20b66c13fe2199ce26d96d7ac473921f9b294229d327e3bf81--RNAStructViz-1.6.5-testing.tar.gz ==> make clean ==> make install INSTALL_PREFIX=/usr/local/Cellar/rnastructviz/v1.6.5-testing_1 Last 15 lines from /Users/bin/Library/Logs/Homebrew/rnastructviz/02.make: CairoVersionString().c_str(), BuildPlatform().c_str(), LocalBuildDateTime().c_str()); const char *bugReportMsg = "Please include a screenshot along with this information in any bug report you submit. New issues with the application can be submitted at https://github.com/gtDMMB/RNAStructViz/issues."; fprintf(whichOut, "BUG REPORT INFORMATION:\n%s\n", bugReportMsg); }

};

endif

make[1]: *** [CairoDrawingUtils.o] Error 1 FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN.

make: *** [install] Error 2

With the alternative choice, it took about 1 hour for my laptop to finish "brew reinstall gtdmmb/core/viennarna". When I tried to run "make", I got an error message like what I reported for the first time(The error message is long so I put it at the end of this report). I guess there might be some issue with my gcc path. I include my current .bash_profile below. Does it look correct?

Thanks, Bin

.bash_profile:

adding alias

alias gcc='gcc-9.1' alias cc='gcc-9.1' alias g++='g++-9.1' alias c++='c++-9.1'

Setting PATH for Python 3.6

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PATH

Setting PATH for Python 3.6

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PATH

added by Anaconda3 4.4.0 installer

export PATH="/Users/bin/anaconda/bin:$PATH"

Setting PATH for Python 2.7

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" export PATH

added by Anaconda3 4.4.0 installer

export PATH="/Users/bin/anaconda/bin:$PATH"

export PATH="/opt/local/bin:/opt/local/sbin:$PATH"


Error message: 50-204-251-125-static:RNAStructViz bin$ make clean && make cd src && make -f Makefile clean cd src && make -f Makefile default /bin/bash greadlink -f ../scripts/build-platform-header.sh \ greadlink -f ./BuildTargetInfo.h\ greadlink -f /usr/local/opt/fltkwithcairo/bin/fltk-config

REPLACING "##GIT_COMMITREV_HASHNUM_SHORT##" WITH "be3bb1d085b1" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##GIT_COMMITREV_HASHNUM##" WITH "be3bb1d085b1fe9a66786302ecf534841d9c913a" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##GIT_COMMITREV_DATE##" WITH "Wed Jun 12 17:16:59 2019 -0400" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##GIT_DESCRIBE_REVSTRING##" WITH "tags/v1.6.4-testing" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##BUILD_PLATFORM_ID__##" WITH "Darwin (16.7.0) [x86_64] @ 50-204-251-125-static.hfc.comcastbusiness.net" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##LOCAL_BUILD_TIME##" WITH "Thu Jun 13 06:47:32 2019" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" REPLACING "##BUILD_FLTK_CONFIG__##" WITH "/usr/local/Cellar/fltkwithcairo/fltk-1.4.x-20190510-874ccfe6_6/bin/fltk-config" IN "/Users/bin/RNAStructViz/src/BuildTargetInfo.h"

LOCAL BUILD HEADER "/Users/bin/RNAStructViz/src/BuildTargetInfo.h" CONTENTS:

/* BuildTargetInfo.h(.in) : Local platform specific definitions inserted at compile time;

ifndef __BUILD_TARGET_INFO_H__

define __BUILD_TARGET_INFO_H__

ifdef TARGETOS_LINUX

 #define __TARGETOS_LINUX__
 #define TARGETOS "GNU/Linux"

endif

ifdef TARGETOS_MACOSX

 #define __TARGETOS_APPLE__
 #define TARGETOS "Mac/OSX"
 #define __APPLE__
 /* Mac OSX apparently does not support the strchrnul function: */
 #include <string.h>
 static inline char* strchrnul(const char *s, int ch) {
      if(s == NULL) {
           return NULL;
  }
      char *strchrResult = (char *) strchr(s, ch);
      if(strchrResult == NULL) {
       size_t slen = strnlen(s, 2048);
           return (char *) (s + slen);
  }
      return strchrResult;
 }    

endif

ifdef TARGETOS_GENERIC_UNIX

 #define __TARGETOS_UNIX__
 #define TARGETOS "Unix"

endif

ifndef TARGETOS

 #define TARGETOS "Unknown Build Target"

endif

ifdef __LOCAL_NOUSE_THREADS

 #undef _GLIBCXX__PTHREADS
 #undef _GLIBCXX_HAS_GTHREADS
 #ifdef __STDC_NO_THREADS__
      #undef __STDC_NO_THREADS__
 #endif
 #define __STDC_NO_THREADS__ (1)

endif

define FLTK_USE_CAIRO 1

define FLTK_HAVE_CAIRO 1

define RNASTRUCTVIZ_VSTRING ("RNAStructViz v1.6.5-testing -- RNA Secondary Structure Comparison Multi-Tool")

define GIT_COMMIT_HASH ("be3bb1d085b1fe9a66786302ecf534841d9c913a")

define GIT_COMMIT_HASH_SHORT ("be3bb1d085b1")

define GIT_COMMIT_DATE ("Wed Jun 12 17:16:59 2019 -0400")

define GIT_BRANCH_REVSTRING ("tags/v1.6.4-testing")

define BUILD_PLATFORM_ID ("Darwin (16.7.0) [x86_64] @ 50-204-251-125-static.hfc.comcastbusiness.net")

define BUILD_DATETIME ("Thu Jun 13 06:47:32 2019")

define BUILD_FLTK_CONFIG ("/usr/local/Cellar/fltkwithcairo/fltk-1.4.x-20190510-874ccfe6_6/bin/fltk-config")

define HUGE_BUFFER_LINE_SIZE (2048)

include

include

include <FL/Fl.H>

include <FL/fl_ask.H>

include

using std::string;

class ApplicationBuildInfo {

 public:
      static inline string UserManualWikiLink() {
           return string("User Manual: https://github.com/gtDMMB/RNAStructViz/wiki");
  }

  static inline string GitRevisionInfoFull() {
           char revString[HUGE_BUFFER_LINE_SIZE];
           snprintf(revString, HUGE_BUFFER_LINE_SIZE, 
                "Git Revision: %s (%s) [%s]", 
                GIT_COMMIT_HASH_SHORT, GIT_COMMIT_HASH, GIT_BRANCH_REVSTRING);
           revString[HUGE_BUFFER_LINE_SIZE - 1] = '\0';
           return string(revString);
      }

  static inline string GitRevisionInfo() {
           char revString[HUGE_BUFFER_LINE_SIZE];
           snprintf(revString, HUGE_BUFFER_LINE_SIZE, 
                "Git Revision: %s [%s]", 
                GIT_COMMIT_HASH_SHORT, GIT_BRANCH_REVSTRING);
           revString[HUGE_BUFFER_LINE_SIZE - 1] = '\0';
           return string(revString);
      }
      static inline string GitRevisionDate() {
           return string("Revision Date: ") + string(GIT_COMMIT_DATE);
      }

      static inline string BuildPlatform() {
       return string("Target Platform: ") + string(BUILD_PLATFORM_ID);
  }

  static inline string LocalBuildDateTime() {
       return string("Local Build Time: ") + string(BUILD_DATETIME);
  }

  static inline string BuildFLTKConfig() {
           return string("FLTK-Config: ") + 
          string(BUILD_FLTK_CONFIG);
  }

  static inline string CairoVersionString() {
           return string("Cairo Library: ") + string(CAIRO_VERSION_STRING);
  }

  static inline string FLTKVersionString() {
           char fltkVersionStr[HUGE_BUFFER_LINE_SIZE];
       snprintf(fltkVersionStr, HUGE_BUFFER_LINE_SIZE - 1, 
        "%d.%d.%d (API #%d)", 
        FL_MAJOR_VERSION, FL_MINOR_VERSION, FL_PATCH_VERSION, FL_API_VERSION);
       fltkVersionStr[HUGE_BUFFER_LINE_SIZE - 1] = '\0';
       return string("FLTK Library: ") + string(fltkVersionStr);
  }

  static inline void PrintAboutListing(FILE *whichOut = stderr) {
           if(whichOut == NULL) {
                whichOut = stderr;
       }
       fprintf(whichOut, "==== %s ====\n\n", RNASTRUCTVIZ_VSTRING);
       fprintf(whichOut, "ABOUT THIS APPLICATION:\n");
           fprintf(whichOut, "   >> %s\n   >> %s\n   >> %s\n   >> %s\n   >> %s\n   >> %s\n   >> %s\n   >> %s\n\n", 
          UserManualWikiLink().c_str(), GitRevisionInfoFull().c_str(), 
          GitRevisionDate().c_str(), FLTKVersionString().c_str(),
          BuildFLTKConfig().c_str(),  
          CairoVersionString().c_str(), BuildPlatform().c_str(), 
          LocalBuildDateTime().c_str());
       const char *bugReportMsg = "Please include a screenshot along with this information in any bug report you submit. New issues with the application can be submitted at https://github.com/gtDMMB/RNAStructViz/issues.";
       fprintf(whichOut, "BUG REPORT INFORMATION:\n**%s**\n", bugReportMsg);
  }

};

endif

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN.

g++ ../scripts/pkg-config-flags.sh --cflags /usr/local/opt/fltkwithcairo/bin/fltk-config --use-gl --use-images --use-glut --use-forms --use-cairo --cxxflags -std=gnu++17 -DFLTK_HAVE_CAIRO -DFLTKSTATIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -funsigned-char -g -Wall -Wextra -pedantic -O0 -march=native -Wno-c++11-narrowing -Wno-c++17-narrowing -c BranchTypeIdentification.cpp g++: error: unrecognized command line option ‘-Qunused-arguments’ g++: error: unrecognized command line option ‘-std=gnu++17’ make[1]: [BranchTypeIdentification.o] Error 1 make: [default] Error 2

maxieds commented 5 years ago

@BinXu18 I suspect that you are still using the default xcode compilers, which actually defaults to a really old version of clang instead of gcc which should have good support for those options. Perhaps the issue is that even though your local bash shell has the aliases defined, the brew installer is using other defaults. You can try these instructions for resetting the default brew compiler to a more recent gcc that you just installed.

BinXu18 commented 5 years ago

Thanks. Here is what I have tried so far. echo 'export PATH=/usr/local/gcc-9.1/bin:$PATH' >> ~/.bash_profile source ~/.bash_profile brew reinstall gtdmmb/core/rnastructviz

Here is the error message. ==> make install INSTALL_PREFIX=/usr/local/Cellar/rnastructviz/v1.6.5-testing_1 Last 15 lines from /Users/bin/Library/Logs/Homebrew/rnastructviz/02.make: BuildFLTKConfig().c_str(),
CairoVersionString().c_str(), BuildPlatform().c_str(), LocalBuildDateTime().c_str()); const char *bugReportMsg = "Please include a screenshot along with this information in any bug report you submit. New issues with the application can be submitted at https://github.com/gtDMMB/RNAStructViz/issues."; fprintf(whichOut, "BUG REPORT INFORMATION:\n%s\n", bugReportMsg); }

};

endif

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN.

make: *** [install] Error 2

maxieds commented 5 years ago

@BinXu18 I realize that this is probably a little late to help you with the workshop. I believe that the straight up source code you are reporting is actually intended behavior from one of our install scripts printing out the contents of a dynamically generated header file (for use with the --about terminal option). You can try re-running the install process with increased verbosity to pinpoint where the actual error is occurring:

brew reinstall --verbose gtdmmb/core/rnastructviz

I still believe that the compiler errors you are encountering with unknown commandline options is due to a masked use of the default Apple XCode gcc (which should actually just be a symlink to clang with the default install). If brew is internally setting up a different compiler path by its scripts when it is called, then the PATH exports you have in your bash config files are not going to fix the error and prevent the out-of-date gcc from getting called. Can you minimally post the output of the following commands so I can get more information about your system environment?

$ sw_vers
$ xcode-select -p
$ uname -a

I have a better suggestion which might be a better (or at least more hackish) way to get around the miserable state of default compiler tools on Apple's platform. I will test it out and post back shortly. Basically, because OSX was once related to BSD, there are still some historical artifacts which suggest its fine lineage from the depths of Unix. In particular, we can play the Gentoo Linux install trick and make brew play nice with the compilers we are expecting using a chroot jail. Let me get back to you on this later this morning.

BinXu18 commented 5 years ago

Thank you for all the information. Here is the information about my system environment. bins-mbp:~ bin$ sw_vers ProductName: Mac OS X ProductVersion: 10.12.6 BuildVersion: 16G2016 bins-mbp:~ bin$ xcode-select -p /Applications/Xcode.app/Contents/Developer bins-mbp:~ bin$ uname -a Darwin bins-mbp.dhcp.nd.edu 16.7.0 Darwin Kernel Version 16.7.0: Wed Apr 24 20:50:53 PDT 2019; root:xnu-3789.73.49~1/RELEASE_X86_64 x86_64

maxieds commented 5 years ago

@BinXu18 Like I mentioned before, I believe that the problem is that (even though you have created aliases in your bash profile) that you are still using out-of-date compiler tools (which are to the old paths when brew is invoked). Can you try to update your entire system to 10.14 via the system update tools (to 10.14.xx)? This should definitely fix the issue.

Alternately, you can try running the following:

$ brew reinstall --cc=gcc-9.1 gtDMMB/core/rnastructviz
maxieds commented 5 years ago

@BinXu18 Did the last install procedure work for you?

BinXu18 commented 5 years ago

Thank you for checking and for all your help. I tried to run $ brew reinstall --cc=gcc-9.1 gtDMMB/core/rnastructviz. I got an error message: Error: invalid option: --cc=gcc-9.1.

Then I tried HOMEBREW_CC=gcc-9.1 HOMEBREW_CXX=g++-9.1 brew reinstall gtDMMB/core/rnastructviz. Here is the error message.

Last 15 lines from /Users/bin/Library/Logs/Homebrew/rnastructviz/02.make: BuildFLTKConfig().c_str(),
CairoVersionString().c_str(), BuildPlatform().c_str(), LocalBuildDateTime().c_str()); const char *bugReportMsg = "Please include a screenshot along with this information in any bug report you submit. New issues with the application can be submitted at https://github.com/gtDMMB/RNAStructViz/issues."; fprintf(whichOut, "BUG REPORT INFORMATION:\n%s\n", bugReportMsg); }

};

endif

FOR A TOTAL OF LINES ( CHARACTERS) WRITTEN.

make: *** [install] Error 2

P.S.:Tried to follow this method. I went back to try the last method posted in MaxOSXInstall. Error: gtdmmb/core/fltkwithcairo fltk-1.4.x-20190510-874ccfe6 did not build.

maxieds commented 5 years ago

@BinXu18 The homebrew developers might have removed the --cc option in recent releases. This is known to happen for some useful options from time to time. It looks like you have two viable options to get RNAStructViz installed:

First method

Upgrade your version of Apple's xcode to the most recent release. I have done this once myself not starting from OSX 10.14, and it can be painful and daunting.

Second method: quasi-from-source install hybrid

Install all of the prerequisite packages for the RNAStructViz brew package using brew. Then clone the GitHub repo and compile the source for yourself. This is not so bad... Observe:

$ brew install pkg-config curl coreutils
$ brew install gtDMMB/core/fltkwithcairo gtDMMB/core/viennarna

Now if you get to this point you're golden! Set

$ export CC=gcc-9.1
$ export CXX=g++-9.1

and then run the following:

$ cd ~
$ git clone https://github.com/gtDMMB/RNAStructViz.git
$ cd RNAStructViz
$ make
# optional:
$ sudo make install

This should give you RNAStructViz.

Let me know if either of these methods works for you so we can document the procedure if any other users have problems with a < 10.14 install in the future.

BinXu18 commented 5 years ago

Thanks for telling me these two methods. Let me try the second one first. Here is what happens.

  1. brew install pkg-config curl coreutils works well. I get some advice about "curl" (curl is keg-only, which means it was not symlinked into /usr/local,because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.If you need to have curl first in your PATH run: echo 'export PATH="/usr/local/opt/curl/bin:$PATH"' >> ~/.bash_profile)

  2. There is a new error when I run brew reinstall gtDMMB/core/fltkwithcairo gtDMMB/core/viennarna. ./configure.

prefix=/usr/local/Cellar/fltkwithcairo/fltk-1.4.x-20190510-874ccfe6_6 --enable-cairo --enable-threads CC=clang -g -DBUILD ==> make install Last 15 lines from /Users/bin/Library/Logs/Homebrew/fltkwithcairo/03.make: 154 | - (void)set; | ^~~ In file included from /System/Library/Frameworks/AppKit.framework/Headers/NSView.h:8, from /System/Library/Frameworks/AppKit.framework/Headers/NSText.h:8, from /System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:11, from /System/Library/Frameworks/AppKit.framework/Headers/NSActionCell.h:8, from /System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:15, from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13, from Fl_cocoa.mm:61: /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h: At global scope: /System/Library/Frameworks/AppKit.framework/Headers/NSApplication.h:383:126: error: type 'void' does not have a known size 383 | - (BOOL)application:(NSApplication )application continueUserActivity:(NSUserActivity )userActivity restorationHandler:(void(^)(NSArray *restorableObjects))restorationHandler NS_AVAILABLE_MAC(10_10); | ^ make[1]: [Fl_cocoa.o] Error 1 make: [install] Error 1

maxieds commented 5 years ago

@BinXu18 I think that the "void doesn't have a known size" error is something I've addressed before. My intuition is that it's related to your native xcode compiler not supporting the most recent C++ standards options, e.g., no support for the option ‘-std=gnu++17’. It doesn't look like there's a better way around you having to just update xcode to a more modern version! The release of OSX 10.12 is well over 2 years old (from 2016) at this point. Unfortunately, that is light years in terms of how much Apple is going to change around their compiler tools and developer-related stacks. Please let me know if there is anything that is unclear for you when you look up how to upgrade your working version of xcode. I have had to do this (once) before, so I might be able to lend some tips.

maxieds commented 5 years ago

@BinXu18

Here is the general procedure for how to update xcode to the most recent release. I assume you have an Apple developer account (if not you can freely register for one). Once you have an account, navigate over to the xcode releases and download the most recent version (my link was this -- be sure to read the release notes first). There are links for downloading over the command line with curl here if you're stuck with a remote shell machine like I use for Mac development.

Once this behemoth comes down off its cloud (warning ~8GB), unzip it by running:

$ cd ~
$ sudo xip -x Xcode_*.xip /
$ sudo xcode-select -s /Xcode-beta.app

Now you should verify that the version of gcc/g++ (actually clang) has been updated:

$ g++ -v
Configured with: --prefix=/Users/Maxie/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.0 (clang-1100.0.28.3)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Users/Maxie/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
BinXu18 commented 5 years ago

Thank you for your detailed explanation. I agree Method 1 is probably the choice. Fortunately, our department has a Mac with Mojave. We are working on getting Xcode installed in this Mac. Thank you for telling me the information about curl.

maxieds commented 5 years ago

I am glad that you will be able to install it soon. I have been credited with getting some minor code miracles to work on Mac OSX this year. Even with Mojave, getting FLTK 1) built with standard configure scripts; and 2) patched by their developers for the massive graphics stack catastrophe that Mojave introduced suddenly with an overnight upgrade. Sadly, Mac is really not a platform for serious developers who have to compile a lot of their own customizations from source at this point. The developer tools from ~2 years ago are just so outdated that they are not even usable anymore without the upgrade. When you do get the upgraded xcode on your system, make sure you use the viennarna and fltkwithcairo brew packages from the gtDMMB tap of brew to get the prerequisites installed. That should save a lot of hassle even if you compile RNAStructViz directly from the GitHub repo.

Do you have a personal PC desktop or laptop that you use? RNAStructViz works very well on modern Ubuntu machines. It's a significantly easier experience to get the code up and running on a Linux than on Mac if the brew packages do not work out of the box. I just mention this because you were able to add aliases to your bash config, which is a sufficient condition for using a Linux box.

BinXu18 commented 5 years ago

I see. Thank you for the information about Mac OSX and Ubuntu machines. It would be useful for choosing a new laptop. My laptop is a MacPro with Sierra, which is an old machine. Let me try the office machine with Mojave. I will keep you posted when I get the Mac. Thanks for telling the installation trick.

maxieds commented 5 years ago

@BinXu18 I realize that the workshop with Christine has passed by over a month. If you are still anxious to test out RNAStructViz for whatever reason, you can install a Linux ISO image like this or this onto a USB memory stick with extra space to spare. Use usbnetbootin (or the Windows equivalent) to "burn" the ISO to your USB stick. Then boot the machine you are working on from the USB and without needing to actually install or change the OS on the machine, you can use Linux. Then you can use RNAStructViz after installing with the Linux from-source procedures on the WIKI pages.

Just another suggestion if it is going to take forever for the local university sysadmin to open up access to the Mac via reinstalling xcode. The tech people at GA Tech are usually pretty responsive, but for custom Linux things, they can be picky and slow to enable "peon" (non-admin) users with enough rights to be dangerous.

BinXu18 commented 5 years ago

Hi Maxie,

Thank you for telling me the new method. Will this new method work for MacOS 10.12.6?

For the university machine, it takes a while for the Tech people here to install the softwares. I will email them on Monday. For the IPAM project lead by Christine and Blair, we are currently using the profiling pipeline. We will meet on Wednesday and I will ask Christine to check when we need RNAStructViz.

Meanwhile, I think it is time for me to close the issue. (I didn't realize that I am the person who can close the issue.) After trying different methods, our conclusion is that updating Xcode to the latest version is necessary. Do you agree that we can close the issue?

Thank you again for showing me different ways to tackle the problem.

Many thanks, Bin

maxieds commented 5 years ago

@BinXu18 Yes, go ahead and close out the issue. You can always post a separate new one if you run into any other installation problems with the new xcode. -- Maxie