sandialabs / seacas

The Sandia Engineering Analysis Code Access System (SEACAS) is a suite of preprocessing, postprocessing, translation, and utility applications supporting finite element analysis software using the Exodus database file format.
Other
132 stars 79 forks source link

Build with Cygwin and gnu compilers #400

Closed rehogan closed 11 months ago

rehogan commented 1 year ago

Hi Greg,

Thanks for your prompt reply. I appreciate it. Made a little progress, but now have new issue. I’ll summarize what I have been able to make work.

  1. I can build all of it fine on Ubuntu 22.04 (on VM VirtualBox) with gnu 11.4.0 compilers… The build process is awesome! Great job. Seamless and smooth!
  2. To work the “realpath” issue, I tried both mingw (11.4.0) and gnu (13.2.0) compilers but neither solved the issue. I was able to get the “realpath” issue resolved by adding “CMAKE_CXX_EXTENSIONS ON” in the CmakeLists.txt file. Found the info at https://github.com/avast/yaramod/issues/25#issuecomment-485226822
  3. I’ve been able to get down to Iocgns_Utils.C where it errors out on “’strcasestr’ was not declared …. “ . Found one discussion around adding -std=g++0x to the g++ cmake flags, but that did not fix it. The link is https://github.com/google/leveldb/issues/872#issuecomment-767614669 . I’m going to take a break (Not sure what to try next!) 😊 I’ve attached a log file of this error. If you have any ideas on what to try, I’d appreciate it.
  4. Thanks again for your help.

make-Iocgns.log

gsjaardema commented 1 year ago

Can you try modifying the code at line 66 of Iocgns_Utils.C:

#if defined(__IOSS_WINDOWS__) || defined(__CYGWIN__)
  const char *strcasestr(const char *haystack, const char *needle)
  {
    std::string lneedle(Ioss::Utils::lowercase(needle));
    std::string lhaystack(Ioss::Utils::lowercase(haystack));

    auto pos = lhaystack.find(lneedle);
    return pos != std::string::npos ? haystack + pos : nullptr;
  }
#endif

Add the || defined(__CYGWIN__) to the end of the existing #if defined test.

I will try to get access to a cygwin system, but that might work for now...

gsjaardema commented 1 year ago

The above change and the CMAKE_CXX_EXTENSIONS change have now been comitted to the repository.

There is also an option in install-tpl.sh script to turn off netCDF building if you have a system-installed netCDF NETCDF=NO HDF5=NO CGNS=NO ./install-tpl.sh

rehogan commented 11 months ago

Thanks Greg. Best I could tell it builds fine with your mods. We appreciate your help! Hope you are doing well. Roy

Roy Hogan

Please pardon brevity and typos, sent from cell phone.


From: Greg Sjaardema @.> Sent: Thursday, October 5, 2023 8:31:04 AM To: sandialabs/seacas @.> Cc: Roy Hogan @.>; Author @.> Subject: Re: [sandialabs/seacas] Build with Cygwin and gnu compilers (Issue #400)

Closed #400https://github.com/sandialabs/seacas/issues/400 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/sandialabs/seacas/issues/400#event-10564723069, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJ42MYJUDTD2YNBB57MRNLX53ACRAVCNFSM6AAAAAA4UOY3FKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQGU3DINZSGMYDMOI. You are receiving this because you authored the thread.Message ID: @.***>