Skip to content

Instantly share code, notes, and snippets.

@schwehr
Created January 27, 2013 00:26
Show Gist options
  • Save schwehr/4645485 to your computer and use it in GitHub Desktop.
Save schwehr/4645485 to your computer and use it in GitHub Desktop.
Trying to build grib_api 1.10.0 on mac osx 10.8
./grib_api-1.10.0/configure --with-jasper=/sw --prefix=/Users/schwehr/Desktop/grib/test-install
make -j 3
Making all in src
Makefile:1406: dummy.am: No such file or directory
make[1]: *** No rule to make target `dummy.am'. Stop.
make: *** [all-recursive] Error 1
# found all dummy.am files and copied them into the VPATH build directory tree. Then that issue went away.
ibtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../grib_api-1.10.0/src -I. -pedantic -Wall -g -O2 -I/sw/include -MT md5.lo -MD -MP -MF .deps/md5.Tpo -c ../../grib_api-1.10.0/src/md5.c -fno-common -DPIC -o .libs/md5.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../grib_api-1.10.0/src -I. -pedantic -Wall -g -O2 -I/sw/include -MT md5.lo -MD -MP -MF .deps/md5.Tpo -c ../../grib_api-1.10.0/src/md5.c -o md5.o >/dev/null 2>&1
mv -f .deps/grib_lex.Tpo .deps/grib_lex.Plo
mv -f .deps/grib_yacc.Tpo .deps/grib_yacc.Plo
mv -f .deps/md5.Tpo .deps/md5.Plo
/bin/sh ../libtool --tag=CC --mode=link gcc -pedantic -Wall -g -O2 -I/sw/include -release 1.10.0 -L/sw/lib -o libgrib_api.la -rpath /Users/schwehr/Desktop/grib/test-install/lib action.lo action_class_alias.lo action_class_gen.lo action_class_if.lo action_class_switch.lo grib_accessor_class_g1fcperiod.lo grib_accessor_class_g1end_of_interval_monthly.lo grib_accessor_class_mars_param.lo action_class_section.lo action_class_list.lo action_class_while.lo action_class_put.lo action_class_meta.lo action_class_remove.lo action_class_assert.lo action_class_template.lo action_class_trigger.lo action_class_when.lo action_class_concept.lo action_class_set.lo action_class_set_darray.lo action_class_set_iarray.lo
<snip>
grib_expression.lo grib_util.lo compile.lo functions.lo grib_yacc.lo grib_lex.lo md5.lo -lm -lopenjpeg -lm
libtool: link: gcc -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -o .libs/libgrib_api-1.10.0.dylib .libs/action.o .libs/action_class_alias.o .libs/action_class_gen.o .libs/action_class_if.o .libs/action_class_switch.o .libs/grib_accessor_class_g1fcperiod.o .libs/grib_accessor_class_g1end_of_interval_monthly.o .libs/grib_accessor_class_mars_param.o .libs/action_class_section.o
<snip>
libs/functions.o .libs/grib_yacc.o .libs/grib_lex.o .libs/md5.o -L/sw/lib -lopenjpeg -lm -install_name /Users/schwehr/Desktop/grib/test-install/lib/libgrib_api-1.10.0.dylib -Wl,-single_module
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/action_class_alias.o
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/action_class_gen.o
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/action_class_if.o
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/action_class_switch.o
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/grib_accessor_class_g1fcperiod.o
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/grib_accessor_class_g1end_of_interval_monthly.o
<snip>
duplicate symbol _grib_file_not_found in:
.libs/action.o
.libs/grib_lex.o
ld: 273 duplicate symbols for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [libgrib_api.la] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
bugger.
https://software.ecmwf.int/wiki/plugins/viewsource/viewpagesrc.action?pageId=12648475
Says to remove -fno-common. e.g.
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
lt_prog_compiler_pic='-fno-common'
;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment