Opened 8 years ago

Closed 5 years ago

#51452 closed defect (fixed)

nco @4.5.2_2 +accelerate build failure

Reported by: almage (Roy Miller) Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc:
Port: nco

Description

nco@4.5.2_2 has failed to build on both OS X 10.9.5 with Xcode 6.2 and OS X 10.10.5 with Xcode 7.2.1. Both have Command Line Tools installed. The failure/error is the same in both cases. The pertinent error appears to be:

:info:build ncap_lex.l:60:10: fatal error: 'ncap_yacc.h' file not found

This surprises me, because the "nap_yacc.h" file is sitting there in the src/nco directory:

Fri May 20 11:11:14 pixie local> find . -name ncap_* -print
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_lex.c
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_lex.l
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_utl.c
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_utl.o
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_yacc.c
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_yacc.h
./var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_nco/nco/work/nco-4.5.5/src/nco/ncap_yacc.y

So I changed to the src/nco directory and entered the same command which failed and generated the error message:

sudo /usr/bin/clang -DHAVE_CONFIG_H -I. -I../..   -I/opt/local/include -I/opt/local/include -I/usr/include/malloc -I/opt/local/include/udunits2 -I/opt/local/include -DENABLE_NETCDF4 -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include/udunits2  -fno-common -pipe -Os -arch x86_64 -std=c99 -D_BSD_SOURCE  -c -o ncap_lex.o ncap_lex.c

this quickly successfully built the "ncap_lex.o" file

I then issued the initial "port install nco" command, and the build finished and nco was installed and activated:

Fri May 20 11:11:52 pixie local> sudo port install nco +accelerate
--->  Computing dependencies for nco
--->  Building nco
--->  Staging nco into destroot
--->  Installing nco @4.5.5_2+accelerate
--->  Activating nco @4.5.5_2+accelerate
--->  Cleaning nco
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             

I don't understand why the "ncap_yacc.h" header file was not recognized during the build, as it is right there with the other source files.

Attachments (1)

nco-main.log (138.8 KB) - added by almage (Roy Miller) 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by almage (Roy Miller)

Attachment: nco-main.log added

comment:1 Changed 8 years ago by almage (Roy Miller)

Cc: gryphon.csd8@… added

Cc Me!

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Cc: takeshi@… gryphon.csd8@… removed
Keywords: Mavericks Yosemite removed
Owner: changed from macports-tickets@… to takeshi@…

The reporter is automatically Cc'ed.

comment:3 Changed 8 years ago by jonathanlilly (Jonathan Lilly)

I had this problem and found an easier solution. After first using MacPorts to manually install the dependencies as described here http://nco.sourceforge.net/#bld_macports, then the MacPorts nco install worked fine.

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

The log says:

:info:build ncap_lex.l:60:10: fatal error: 'ncap_yacc.h' file not found
:info:build #include "ncap_yacc.h" /* Symbol definitions from parser */
:info:build          ^
:info:build 1 error generated.
:info:build make[3]: *** [ncap_lex.o] Error 1
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build updating ncap_yacc.h

In other words, first it looked for ncap_yacc.h and couldn't find it, which caused the build to fail. Then it created ncap_yacc.h. So this is a parallel build problem. If the problem still exists with the current version of nco, it could be worked around by not doing a parallel build (i.e. sudo port install nco build.jobs=1), but the developer should fix it by declaring the dependencies of the targets in the Makefile correctly.

comment:5 Changed 5 years ago by tenomoto (Takeshi Enomoto)

Resolution: fixed
Status: newclosed

ncap_yacc.h is no longer used in 4.9.1.

Note: See TracTickets for help on using tickets.