[ncl-install] Mysterious missing symbol error in NCL libraries

Cook, Rich cook47 at llnl.gov
Mon May 11 14:46:39 MDT 2015


I'm attaching my entire build log per your request.
I've looked at https://www.ncl.ucar.edu/Download/build_from_src.shtml#ConfigurationFiles but I just can't seem to figure out which files to add the include flags I need to make it see freetype on our system.
I tried
make Everything CFLAGS=-I/usr/include/freetype2
but this caused problems.
Thanks
-- Rich


On May 11, 2015, at 12:33 PM, Cook, Rich <cook47 at llnl.gov<mailto:cook47 at llnl.gov>> wrote:

What's the easy way top tell NCAR where freetype lives?  I see
/usr/include/freetype2/freetype/config/ftheader.h
but I guess that's not NCAR's assumed location.
Thanks
-- Rich

On May 11, 2015, at 11:25 AM, Cook, Rich <cook47 at llnl.gov<mailto:cook47 at llnl.gov>> wrote:

Hi, aha, yes, you are correct.
I guess looking for the word "Error" in my build log was too obvious an exercise for me.  :-|
It would be good if the build would fail instead of appearing to complete, but it looks like I have a way forward here.  I need to install freetype it looks like...

intel: icc-14.0.174 -ansi -openmp  -O  -I../../../.././include -I/usr/include/X11  -DLinux    -DCTXT -DX11 -DPS -DPDF -DPIX  -DSYSV -D_POSIX_SOURCE -D_XOPEN_SOURCE -DByteSwapped -DNeedFuncProto    -c -o cro_device.o cro_device.c
intel: In file included from /usr/include/cairo/cairo-ft.h(47),
intel:                  from cro.h(147),
intel:                  from cro_device.c(26):
intel: /usr/include/ft2build.h(56): catastrophic error: cannot open source file "freetype/config/ftheader.h"
intel:   #include <freetype/config/ftheader.h>
intel:                                        ^
intel:
intel: compilation aborted for cro_device.c (code 4)
intel: make[5]: *** [cro_device.o] Error 4
intel: make[5]: Leaving directory `/tmp/dpkg-mkdeb.ljmPKZOP1X/src/ncl_ncarg-6.3.0/ncarg2d/src/libncarg_gks/cdrivers'



On May 11, 2015, at 11:01 AM, Mary Haley <haley at ucar.edu<mailto:haley at ucar.edu>> wrote:

Hi Richard,

The likely issue is that the GKS library didn't get fully built, and the culprit is probably the "cdrivers" directory under the "$NCARG/ncarg2d/src/libncarg_gks" directory.  There's some source code in that directory that depends on cairo, which is an external package required by NCL V6.3.0. It wasn't required by NCL V6.0.0. My guess is that the build failed because it couldn't find some required include files by cairo and/or freetype.

Can you email me the full build log so I can see where the error is?

--Mary


On Mon, May 11, 2015 at 10:26 AM, Cook, Rich <cook47 at llnl.gov<mailto:cook47 at llnl.gov>> wrote:
Hello,
I'm sorry if this is a known issue;  I am the maintainer of our cluster installation of NCAR on our machines.  A user recently complained to me that he is having linker errors when trying build against ncar:

// -------------------------------------------------------------------------
ifort     shok3.o /usr/local/lib/libmbase.a /usr/local/tools/ncar-intel-6.3.0/lib/libncarg.a /usr/local/tools/ncar-intel-6.3.0/lib/libncarg_gks.a /usr/local/tools/ncar-intel-6.3.0/lib/libncarg_c.a /usr/local/tools/ncar-intel-6.3.0/lib/libcgm.a /usr/lib64/libX11.so -o shok3
/usr/local/tools/ncar-intel-6.3.0/lib/libncarg_gks.a(gziqwk.o): In function `gziqwk_':
gziqwk.f:(.text+0x123): undefined reference to `ggkwdr_'
/usr/local/tools/ncar-intel-6.3.0/lib/libncarg_gks.a(gztowk.o): In function `gztowk_':
gztowk.f:(.text+0x2ce): undefined reference to `ggkwdr_'
gztowk.f:(.text+0x5a2): undefined reference to `ggkwdr_'
gztowk.f:(.text+0x984): undefined reference to `ggkwdr_'
make: *** [shok3] Error 1
// -------------------------------------------------------------------------

Naturally I googled to find a solution but none of the postings I found seemed relevant to me -- they all referenced some w_char problem from ages past, which I don't see any hint of in my build logs.

If the user tries building against our 6.0.0 build, he does not have this problem -- nm reveals that the symbol lives in libncarg_c.a
I looked and ggkwdr() is a function from file fort_c.c
When I compared the build logs of the two versions, I see that in 6.0.0, fort_c.o gets archived into libncarg_c.a, which then gets installed into the INSTALL_DIR/lib:

// -------------------------------------------------------------------------
ar vru ../libncarg_gks.a fort_c.o gksc.o transform.o gksP.o gks_device.o ctxt_device.o ctxt.o ctxt_conv.o xdevice.o font.o text.o x_conv.o xattribute.o xcontrol.o xinquiry.o xoutput.o psdevice.o ps.o ps_conv.o psfill.o pdf.o pdfdevice.o pdf_conv.o pdffill.o pixcontrol.o     pixoutput.o pixdevice.o   pix_conv.o       pixattribute.o  pixinquiry.o pixwrite_xwd.o
....
intel: ranlib libncarg_gks.a
intel: Installing libncarg_gks.a
intel: ranlib /usr/local/tools/ncar-intel-6.3.0/lib/libncarg_gks.a
// -------------------------------------------------------------------------

But in the build log for version 6.3.0, fort_c.o gets stuffed into a library called libbasegks.a, and this library never seems to be installed anywhere or used:

// -------------------------------------------------------------------------
intel: ar vru ../libbasegks.a fort_c.o gksc.o transform.o gksP.o argb.o
....
(no more mention of libbasegks.a in the build log from here)
// -------------------------------------------------------------------------

Can someone help me understand what's wrong with my build process?
I'm building them both identically, using the config/LINUX.INTEL configuration.

Thanks!

--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue,  Livermore, CA, 94550, USA
<emoji_u260e.png> (office) (925) 423-9605<tel:%28925%29%20423-9605>
<emoji_u260e.png> (fax) (925) 423-6961<tel:%28925%29%20423-6961>
---
Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)




_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install



--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue,  Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (925) 423-6961
---
Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)




--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue,  Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (925) 423-6961
---
Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)




--
✐Richard Cook
✇ Lawrence Livermore National Laboratory
Bldg-453 Rm-4024, Mail Stop L-557
7000 East Avenue,  Livermore, CA, 94550, USA
☎ (office) (925) 423-9605
☎ (fax) (925) 423-6961
---
Information Management & Graphics Grp., Services & Development Div., Integrated Computing & Communications Dept.
(opinions expressed herein are mine and not those of LLNL)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20150511/83714c66/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intel-log.txt.gz
Type: application/x-gzip
Size: 93843 bytes
Desc: intel-log.txt.gz
Url : http://mailman.ucar.edu/pipermail/ncl-install/attachments/20150511/83714c66/attachment-0001.gz 


More information about the ncl-install mailing list