Re: Compiling ncl/ncar graphics on OpenSolaris

From: Richard Jacobsen <ramassa_at_nyahnyahspammersnyahnyah>
Date: Fri Jul 30 2010 - 15:54:38 MDT

OS: OpenSolaris 2009.06
Compilers: SunStudio12.1
NCARG 5.2.1

I took Sun4Solaris and copied it to SolarisPC (which was what Configure
detected I was using, I guess), but then I modified it a bit to get
things working. It and my Site.local are attached.

I bet removing the #define HdfDefines -DSUN from it would also fix that
hdf include problem I was getting.

Richard

Mary Haley wrote:
> Yes, I would! What versions of OpenSolaris and the compilers are you using?
>
> --Mary
>
> On Jul 30, 2010, at 3:03 PM, Richard Jacobsen wrote:
>
>
>> Missing some references to libsunmath and a few others. I have fixed
>> them and got everything to compile. Would you like my config and
>> Site.local?
>>
>> Richard
>>
>> Mary Haley wrote:
>>
>>> What are your library issues?
>>>
>>> --Mary
>>>
>>> On Jul 29, 2010, at 5:28 PM, Richard Jacobsen wrote:
>>>
>>>
>>>
>>>> Hi Mary,
>>>>
>>>> mmm, removing the defined SUN got me a bit further, now I've got some
>>>> library issues.
>>>>
>>>> Thanks!
>>>>
>>>> Mary Haley wrote:
>>>>
>>>>
>>>>> Hi Richard,
>>>>>
>>>>> This looks like an issue with HDF4 and not NCAR Graphics. What version of HDF4 did you install, and did you use the same compiler to build it?
>>>>>
>>>>>
>>>>> Near line 401 in our version of the HDF "hproto.h" file, we have:
>>>>>
>>>>> #if defined VMS || defined macintosh || defined MAC || defined SYMANTEC_C || defined MIPSEL || defined NEXT || defined CONVEX || defined IBM6000 || defined SUN || defined IRIX
>>>>> HDFPUBLIC extern char *HDstrdup
>>>>> (const char *s);
>>>>>
>>>>> #endif
>>>>>
>>>>> I wonder if you try a test and remove the "|| defined SUN" from this line, and type "make" in the /export/home/richard/src/ncarg/ncl_ncarg-5.2.1/ncarview/src/lib/libncarg_ras directory, does it work?
>>>>>
>>>>> You might want to check with the HDF4 folks about this hproto.h file, and what they recommend to get it to work on an OpenSolaris system.
>>>>>
>>>>> --Mary
>>>>>
>>>>> On Jul 29, 2010, at 12:32 PM, Richard Jacobsen wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I'm trying to get ncl/ncarg compiling on OpenSolaris 2009.06. I've had the best luck with the Sun4Solaris target, but I'm getting one error:
>>>>>>
>>>>>> cc -Xt -D_FILE_OFFSET_BITS=64 -O -I../../../.././include -I/usr/openwin/include -I/usr/include -I/usr/local/include -DBuildRasterHDF -DSUN -DBuildRasterHPPCL -DBuildRasterNrif -DBuildRasterSun -DBuildRasterXWD -DBuildRasterAVS -DBuildRasterSGI -DBuildRasterAbekas -DBuildRasterBinary -DBuildRasterYUV -DNGTMPDIR='"tmp"' -DPC -DSUN -DSYSV -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__ -DNeedFuncProto -c hdf.c
>>>>>> "/usr/local/include/hdf/hproto.h", line 401: syntax error before or at: char
>>>>>> "/usr/local/include/hdf/hproto.h", line 401: function cannot return function or array
>>>>>> "/usr/local/include/hdf/hproto.h", line 401: warning: old-style declaration or incorrect type for: strdup
>>>>>> "/usr/local/include/hdf/hproto.h", line 401: identifier redeclared: strdup
>>>>>> current : function() returning int
>>>>>> previous: function(pointer to const char) returning pointer to char : "/usr/include/string.h", line 107
>>>>>> "/usr/local/include/hdf/hproto.h", line 401: syntax error before or at: )
>>>>>> "/usr/local/include/hdf/hproto.h", line 402: warning: syntax error: empty declaration
>>>>>> cc: acomp failed for hdf.c
>>>>>> *** Error code 1
>>>>>> make: Fatal error: Command failed for target `hdf.o'
>>>>>> Current working directory /export/home/richard/src/ncarg/ncl_ncarg-5.2.1/ncarview/src/lib/libncarg_ras
>>>>>> *** Error code 1
>>>>>> The following command caused the error:
>>>>>> for dir in libcgm libncarg_ras libctrans libictrans ; do \
>>>>>> if (test -d $dir) then \
>>>>>> (cd $dir; echo "Making ./ncarview/src/lib/$dir";\
>>>>>> make );sleep 1;\
>>>>>> else echo "NOT Making ./ncarview/src/lib/$dir"; fi \
>>>>>> done
>>>>>> make: Fatal error: Command failed for target `makesubdirs'
>>>>>>
>>>>>> Attached are my make-output from make Everything, Site.local, and SolarisPC (copied Sun4Solaris target)
>>>>>>
>>>>>> When I tried the autodetected SolarisPC target, I had an early compile error saying that it couldn't find libc.
>>>>>>
>>>>>> Has anyone succesfully compiled on Opensolaris?
>>>>>>
>>>>>> Thanks,
>>>>>> Richard
>>>>>> <make-output.txt><Site.local><SolarisPC.txt>_______________________________________________
>>>>>> ncarg-talk mailing list
>>>>>> ncarg-talk@ucar.edu
>>>>>> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>>>>>>
>>>>>>
>>>>>>
>>>> _______________________________________________
>>>> ncarg-talk mailing list
>>>> ncarg-talk@ucar.edu
>>>> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>>>>
>>>>
>>>
>> _______________________________________________
>> ncarg-talk mailing list
>> ncarg-talk@ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
>>
>
>

/*
 * This file was created by the Configure script.
 */

#ifdef FirstSite

#endif /* FirstSite */

#ifdef SecondSite

#define YmakeRoot /usr/local/ncarg

#define NetCDFlib -lnetcdf -lhdf5_hl -lhdf5 -lm -lz

#define LibSearch -L/usr/openwin/lib -L/usr/lib -L/usr/local/lib
#define IncSearch -I/usr/openwin/include -I/usr/include -I/usr/local/include

#define BuildNetCDF4 0
#define NetCDF4lib
#define BuildTRIANGLE 0
#define BuildUdunits 0
#define UdUnitslib
#define BuildHDFEOS 0
#define HDFEOSlib
#define BuildHDFEOS5 0
#define HDFEOS5lib
#define BuildGRIB2 0
#define GRIB2lib
#define BuildV5D 0
#define V5Dlib

#endif /* SecondSite */

/*
 * Description: This file contains all the directives needed to
 * tell ymake how to build NCARG/NCL on a system
 * running Solaris (not Solaris x86).
 *
 * The default version of this file assumes you are
 * using the native Sun compilers.
 *
 * You may need to modify it to change or include
 * options, especially for the "CtoFLibraries" line.
 */
/*
#define CtoFLibraries -R/opt/sunstudio12.1/lib/ -lF77 -lM77 -lsunmath -lm -lsunquad
*/
#define CtoFLibraries -R/opt/sunstudio12.1/lib/ -lfsu -lsunmath -lfui -lm -lsunquad
#define HdfDefines -DSUN
#define Cstatic -Bstatic
#define Cdynamic -Bdynamic
#define ExtraSysLibraries -lnsl -lintl -lsocket -ldl -lw
#define CcOptions -Xt -D_FILE_OFFSET_BITS=64
#define CppCommand /usr/ccs/lib/cpp
#define FCppCommand /usr/ccs/lib/cpp
#define DoesRanlib NO
#define LintCommand alint
#define StdDefines -DSYSV -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__

#define ArchRecLibSearch -L/usr/openwin/lib
#define ArchRecIncSearch -I/usr/openwin/include

#define XLibrary -lX11 -lXext
#define XmotifLibrary -lXm
#define XToolLibrary -lXt -lSM -lICE

#define UseCatDirs YES
Received on Fri Jul 30 15:54:51 2010

This archive was generated by hypermail 2.1.8 : Fri Jul 29 2011 - 08:54:58 MDT