ld: duplicate symbol using Xcode 3.2.5 /usr/bin/ld on 10.6.8

ld: duplicate symbol using Xcode 3.2.5 /usr/bin/ld on 10.6.8

I'm building NASA SeaDAS 6.4 on Snow Leopard using the Intel compilers.  I have done this in the past with older versions of the Intel compilers, but had to upgrade due to problems building another application.  After the upgrade, SeaDAS builds failed.

 Xcode is version 3.2.5 and provides:

/usr/bin/ld -v
@(#)PROGRAM:ld PROJECT:ld64-97.17
llvm version 2.9svn, from Apple Clang 1.7 (build 77)

My Intel compiler version:

ifort version 12.1.6

icc version 12.1.6 (gcc version 4.2.1 compatibility)

icpc version 12.1.6 (gcc version 4.2.1 compatibility)

When I try to build SeaDAS, ld reports bogus duplicate symbols:

ifort -o l2gen main_l2gen.o l1subpix.o get_l2prod_index.o msl12_input.o \
filter.o getl1rec.o loadl1.o xcal.o cpl1rec.o l1_io.o scene_meta.o \
target_io.o l1_hdf_generic_read.o l1_hdf_generic_write.o l1_mos_hdf.o \
l1_octs_hdf.o l1_czcs_hdf.o ll2vec.o l1_modis_hdf.o l1_hmodis_hdf.o \
l1_xcal_hdf.o l1_pci_hdf.o l1_meris_N1.o l1_meris_CC.o l1_viirs_h5.o \
viirs_utls.o prodgen.o prodlist.o l2_hdf_generic.o l1a_seawifs.o \
l1a_osmi.o l1_ocm_hdf.o l1_ocm2_hdf.o l1_ocmdb_hdf.o intpos.o \
l12_seawifs.o getformat.o alloc_l1.o alloc_l2.o alloc_target.o \
alloc_vcal.o convl12.o convl21.o rdsensorinfo.o atmocor1.o \
atmocor1_land.o whitecaps.o rayleigh.o polcor.o setanc.o setflags.o \
cloud_flag.o get_chl.o get_es.o get_Kd.o get_ndvi.o get_smoke.o \
get_depth.o get_poc.o get_tsm.o get_par.o get_toa_refl.o get_tricho.o \
photic_depth.o cdom_morel.o calc_par.o ipar_arp.o ipar.o fluorescence.o \
water_vapor.o airmass.o aerosol.o atmocor2.o glint.o b128_msk_get.o \
b128_wd_bit.o b128_box_num.o getglint.o fresnel.o get_rhown_nir.o \
mumm.o nlw_outband.o brdf.o filehandle_init.o get_dem_height.o \
get_rhos.o calcite.o ice_mask.o get_ice_frac.o smi_climatology.o \
bin_climatology.o aer_io.o alloc_aer.o amoeba.o gsm.o giop.o carder.o \
las_iop.o pml.o get_pml.o pml_iop_calculate.o pml_iop_config.o \
pml_iop_tables.o qaa.o get_qaa.o flags_iop.o niwa_iop.o get_niwa_iop.o \
aph.o water.o get_f0.o windex.o brightness.o sst.o sstref.o sssref.o \
soa_sma.o atmcor_soa.o soa_sma_utils.o gas_trans.o vcal.o myprod.o \
dtran_brdf.o turbid.o init_l2.o init_l1.o h5io.o convert_band.o \
fuzzy_func_v3.o gammln.o gcf.o gser.o nrutil.o sprsax.o sprsin.o \
covariance_inversion.o lubksb.o ludcmp.o owt.o get_owmc.o \
lonlat2pixline.o seawater.o viirs_pxcvt.o \
-L/Users/gwhite/seadas64i/build/lib \
-L/Users/gwhite/seadas64i/build/lib3/lib -ll2 -lanc -lczcs -losmi \
-lmeris -lseawifs -lnav -lgsl -lgslcblas -lgenutils -lhdfutils -lmfhdf \
-ldf -lnetcdf -lhdf5_hl -lhdf5 -ljpeg -lz -static-libgcc -static-intel \
-nofor_main -lm -lc -lgcc_eh -lstdc++-static
ld: duplicate symbol _intercept$non_lazy_pointer in l2gen and l2gen
make[2]: *** [l2gen] Error 1

I also have macports:
$ /opt/local/libexec/ld64/ld -v
@(#)PROGRAM:ld PROJECT:ld64-127.2
llvm version 2.9svn, from Apple Clang 1.7 (build 77)

$ port provides /opt/local/libexec/ld64/ld
/opt/local/libexec/ld64/ld is provided by: ld64

I see from other posts that duplicate symbol problems have been resolved by upgrading Xcode, but it appears I will need a paid Apple Developer membership to get Xcode 4, so instead I tried bulding the application with "-B/opt/local/libexec/ld64" and got working binaries.  The Portfile for macports ld64 suggests that ld64-127.2 is from Xcode 4.2.

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Xcode 4 is a free download from the Apple Store.

Retired 12/31/2016

I have a free Developer membership with Apple, but the App Store is blocked by our corporate firewall. I looked for Xcode 4.0 under Downloads
at . The last version listed for Snow Leopard is 3.2.6. After that the version jumps to 4.1 for Lion. It may not matter as none of the links on the page work.

We also use R so I hoped to stick with Xcode 3.2.5 because the gfortran-4.2 compiler need GNU gcc.

I'd spend the $99 for a membership if I was sure it would get me Xcode 4, but I would not be happy if I spend the money and still couldn't install it.

Apple changed the way they make Xcode available as of Xcode4 . The free developer membership will let you get to https://developer.apple.com/downloads/index.action where Xcode 4 is available for download independent of the App Store.

Retired 12/31/2016

Form here the links on are all inactive. I did find the Xcode 4.2 Release Notes:

Xcode 4.2 Release Notes


• You can install Xcode 4.2 for OS X v10.6 Snow Leopard only if you have purchased an earlier release of Xcode.

Install or update Xcode through the Purchases or Updates panes.

I will contact Apple.

Apple confirmed that Xcode 4 for Snow Leopard requires a paid developer subscription, and will be available to subscribers without using App Store. Meanwhile upstream (NASA) has moved to Lion, so I'm asking IT to upgrade our systems.

That's just not true. I got Xcode 4 for Snow Leopard from the App Store for $5 - and it was later changed to be free. No paid developer subscription required, though if you have one you should be able to get it too. Did the link I give you not work? It works for me and I don't have a paid subscription.

Retired 12/31/2016

The link didn't work from me, nor does App Store. The link gave a list of packages, including Xcode for Lion and ML, but but it didn't include Xcode for SL. I even downloaded Xcode for Lion and tried the installer, but as expected it refused to install on SL. Does Apple have different policies for different domains?

Oh, I missed the part that said you wanted Xcode 4 for SL specifically. You are right - that combination does require being a registered developer.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today