<p dir="ltr">Thanks. It compiles now. But I had to manually change the linker in the makefile generated by makenek. Is there a way to do this properly without having to edit makefile.</p>
<p dir="ltr">Praveen</p>
<div class="gmail_quote">On 1 Dec 2013 13:09,  <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> -stdlib=libc++<br>
<br>
Ah I switched those around. But good that you figured this out.<br>
<br>
> Undefined symbols for architecture x86_64:<br>
><br>
>   "_userq2_", referenced from:<br>
<br>
userq2 should be part of your problem setup - *.usr file. Make sure<br>
this is defined and implemented correctly before appropriate linkage.<br>
<br>
On Sun, Dec 1, 2013 at 1:24 AM,  <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>> wrote:<br>
><br>
> On Sun, Dec 1, 2013 at 12:36 PM, <<a href="mailto:nek5000-users@lists.mcs.anl.gov">nek5000-users@lists.mcs.anl.gov</a>> wrote:<br>
>><br>
>> Praveen,<br>
>><br>
>> The linker with mpif77 cannot handle -stdlib since it should be passed<br>
>> to a clang compiler and not gfortran. Try changing the linker from<br>
>> mpif77 to mpicxx.<br>
>><br>
>> I dont have a configuration setup with this combination of<br>
>> OpenMPI+clang to test currently. I have mpich3+clang3.4 on a ubuntu<br>
>> system and can try to check if NEK builds cleanly there after<br>
>> upgrading my gfortran. If there are clang issues, it should show up<br>
>> there too.<br>
>><br>
>> Vijay<br>
><br>
><br>
> Hello Vijay<br>
><br>
> It seems that I have to use<br>
><br>
> -stdlib=libc++<br>
><br>
> I manually changed the linker command in makefile. I dont get the c++ errors<br>
> but something else<br>
><br>
> openmpic++ -o nek5000  obj/ray.o obj/drive.o obj/drive1.o obj/drive2.o<br>
> obj/plan4.o obj/bdry.o obj/coef.o obj/conduct.o obj/connect1.o<br>
> obj/connect2.o obj/dssum.o obj/edgec.o obj/eigsolv.o obj/gauss.o<br>
> obj/genxyz.o obj/navier1.o obj/makeq.o obj/navier0.o obj/navier2.o<br>
> obj/navier3.o obj/navier4.o obj/prepost.o obj/speclib.o obj/map2.o<br>
> obj/turb.o obj/mvmesh.o obj/ic.o obj/ssolv.o obj/planx.o obj/math.o<br>
> obj/mxm_wrapper.o obj/hmholtz.o obj/gfdm_par.o obj/gfdm_op.o<br>
> obj/gfdm_solve.o obj/subs1.o obj/subs2.o obj/genbox.o obj/gmres.o obj/hsmg.o<br>
> obj/convect.o obj/induct.o obj/perturb.o obj/navier5.o obj/navier6.o<br>
> obj/navier7.o obj/navier8.o obj/fast3d.o obj/fasts.o obj/calcz.o obj/byte.o<br>
> obj/chelpers.o obj/byte_mpi.o obj/postpro.o obj/cvode_driver.o<br>
> obj/nek_comm.o obj/init_plugin.o obj/setprop.o obj/qthermal.o<br>
> obj/cvode_aux.o obj/makeq_aux.o obj/papi.o obj/ssygv.o obj/dsygv.o<br>
> obj/nek_in_situ.o obj/mxm_std.o obj/blas.o obj/moab.o obj/imeshutil.o<br>
> obj/imeshcutil.o obj/comm_mpi.o obj/singlmesh.o obj/jl_gs.o obj/jl_sort.o<br>
> obj/jl_sarray_transfer.o obj/jl_sarray_sort.o obj/jl_gs_local.o<br>
> obj/jl_crystal.o obj/jl_comm.o obj/jl_tensor.o obj/jl_fail.o<br>
> obj/jl_fcrystal.o obj/jl_findpts.o obj/jl_findpts_local.o obj/jl_obbox.o<br>
> obj/jl_poly.o obj/jl_lob_bnd.o obj/jl_findpts_el_3.o obj/jl_findpts_el_2.o<br>
> obj/jl_sparse_cholesky.o obj/jl_xxt.o obj/jl_fcrs.o  -L/opt/local/lib<br>
> -L/Users/praveen/Applications/moab/moab-4.6.2/lib<br>
> -L/Users/praveen/Applications/moab/moab-4.6.2/lib -liMesh -lMOAB -lnetcdf<br>
> -lhdf5     -lm  -L/opt/local/lib<br>
> -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.1<br>
> -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.1/../../.. -lmpi_usempi<br>
> -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm  -L/opt/local/lib<br>
> -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.1<br>
> -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.1/../../.. -lmpi_usempi<br>
> -lmpi_mpifh -lmpi -lgfortran -lquadmath -lm  -lmpi_cxx -lstdc++<br>
> -stdlib=libc++<br>
><br>
> Undefined symbols for architecture x86_64:<br>
><br>
>   "_userq2_", referenced from:<br>
><br>
>       _setqvol_ in conduct.o<br>
><br>
>       _makeuq_ in conduct.o<br>
><br>
> ld: symbol(s) not found for architecture x86_64<br>
><br>
> clang: error: linker command failed with exit code 1 (use -v to see<br>
> invocation)<br>
><br>
> make: *** [nek5000] Error 1<br>
><br>
><br>
> Thanks<br>
><br>
> praveen<br>
><br>
><br>
> _______________________________________________<br>
> Nek5000-users mailing list<br>
> <a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
><br>
_______________________________________________<br>
Nek5000-users mailing list<br>
<a href="mailto:Nek5000-users@lists.mcs.anl.gov">Nek5000-users@lists.mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users</a><br>
</blockquote></div>