Thanks for the reply. -Wl,--export-dynamic was already defined. After a lot of back and forth if i removed -Wl,--no-whole-archive /nfs/punlinuxvault1/fcdata5/data9/schadha/julia-0.4.6/usr/lib/libunwind-generic.a /nfs/punlinuxvault1/fcdata5/data9/schadha/julia-0.4.6/usr/lib/libunwind.a and added -Wl,-E it worked. Cant figure out what i was doing wrong though and why the default settings dont work.
Anyway thank you for helping me with this. On Saturday, 9 July 2016 11:34:13 UTC+5:30, Sourabh Chadha wrote: > > I am new to Julia and have been trying to use ccall to call C functions in > embedded mode but i am unable to even successfully run the example > embedding.c that is in package. The example file define a > function my_c_sqrt and then tries to call it using jl_eval_string("println( > ccall( :my_c_sqrt, Float64, (Float64,), 2.0 ) )");. This doesnt work and if > i trace the issue by printing errors i get ErrorException("ccall: could not > find function my_c_sqrt"). > > I have tried checking eveything. nm on the executble gives this. > nm ../usr/bin/embedding | grep my > 0000000000601d80 t __frame_dummy_init_array_entry > 0000000000400f60 t frame_dummy > 0000000000400f90 t my_c_sqrt > > so the symbol is available. > > I am running Red Hat Enterprise Linux Workstation release 7.0 (Maipo) nd > hve compiled julia Version 0.4.6 from scratch. > > any help would be really appreciated > >