Thank you for the reply. Will configure libmesh with METHOD=devel and 
--disable_static.

I am installing libmesh on a new cluster with developed compliers, so I used AR 
..

The link of my code using libmesh is the follows, I can not find related things 
about libstdc++.so in the Makefile.

mpiCC two_phase_ch_ns.alpha-unknown-none.opt.o 
update_rel_vel.alpha-unknown-none.opt.o wall_velocity.alpha-unknown-none.opt.o 
-o two_phase_ch_ns -Wl,-rpath 
-Wl,/home/export/online1/systest/swsiat/luoli/petsc-3.4/64bit-opt/lib 
-Wl,-rpath -Wl,/home/export/online1/systest/swsiat/lapack-3.4.1 -Wl,-rpath 
-Wl,/home/export/online1/systest/swsiat/luoli/libmesh-0.9.3/install-debug/lib  
-L/home/export/online1/systest/swsiat/luoli/petsc-3.4/64bit-opt/lib 
-L/home/export/online1/systest/swsiat/lapack-3.4.1 
-L/usr/sw-mpp/swcc/swgcc-binary/lib 
-L/usr/sw-mpp/swcc/lib/gcc-lib/alpha-swcc-linux/5.421-sw-437/lib 
-L/usr/sw-mpp/lib -L/usr/sw-mpp/mpi2/lib 
-L/usr/sw-mpp/swcc/swgcc-binary/lib/gcc/alphaev6-unknown-linux-gnu/4.1.2 
-L/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/lib 
-L/usr/sw-mpp/swcc/sw5gcc-binary/lib/gcc/alphaev6-unknown-linux-gnu/4.1.2 
-L/usr/sw-mpp/swcc/sw5gcc-binary/lib/gcc 
-L/usr/sw-mpp/swcc/sw5gcc-binary/alphaev6-unknown-linux-gnu/lib 
-L/home/qh/swgcc_sw4A_alpha/gcc_build/alphaev6-unknown-linux-gnu/libstdc++-v3/src
 
-L/home/qh/swgcc_sw4A_alpha/gcc_build/alphaev6-unknown-linux-gnu/libstdc++-v3/src/.libs
 -L/home/qh/swgcc_sw4A_alpha/gcc_build/./gcc 
-L/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/bin 
-L/usr/sw-mpp/swcc/swgcc-binary/lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/lib
 -lmv -lgcc_eh 
-L/home/export/online1/systest/swsiat/luoli/libmesh-0.9.3/install-debug/lib 
/home/export/online1/systest/swsiat/luoli/libmesh-0.9.3/install-debug/lib/libmesh_opt.a
 
/home/export/online1/systest/swsiat/luoli/libmesh-0.9.3/install-shared/lib/libnetcdf.a
 -lpetsc -llapack -lrefblas /usr/sw-mpp/mpi2/lib/libmpifort.a -lfortran_slave 
-lffio_slave -lmv_slave -lfortran -lffio -lslave -lathread -lc_slave -lmaster 
/usr/sw-mpp/mpi2/lib/libmpicxx.a /usr/sw-mpp/mpi2/lib/libmpi.a -lswtm 
-libverbs_wd -lrt -ldl -lpthread -los_master_isp 
/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/lib/libstdc++.so -lm 
-lc -lgcc_s -Wl,-rpath 
-Wl,/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/lib -Wl,-rpath 
-Wl,/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/lib
/usr/sw-mpp/swcc/sw5gcc-binary/bin/../lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/bin/ld:
 Warning: size of symbol `sys_m_selfmap' changed from 644 in 
/usr/sw-mpp/swcc/sw5gcc-binary/alphaev6-unknown-linux-gnu/lib/libmaster.a(libos_interface.o)
 to 608 in /usr/sw-mpp/lib/libos_master_isp.a(libos_interface.o)
/usr/sw-mpp/swcc/sw5gcc-binary/bin/../lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/bin/ld:
 Warning: size of symbol `sys_m_employ' changed from 404 in 
/usr/sw-mpp/swcc/sw5gcc-binary/alphaev6-unknown-linux-gnu/lib/libmaster.a(libos_interface.o)
 to 432 in /usr/sw-mpp/lib/libos_master_isp.a(libos_interface.o)
/usr/sw-mpp/swcc/sw5gcc-binary/bin/../lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/bin/ld:
 Warning: size of symbol `sys_m_run' changed from 400 in 
/usr/sw-mpp/swcc/sw5gcc-binary/alphaev6-unknown-linux-gnu/lib/libmaster.a(libos_interface.o)
 to 392 in /usr/sw-mpp/lib/libos_master_isp.a(libos_interface.o)
/usr/sw-mpp/swcc/sw5gcc-binary/bin/../lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/bin/ld:
 Warning: size of symbol `sys_m_stop' changed from 260 in 
/usr/sw-mpp/swcc/sw5gcc-binary/alphaev6-unknown-linux-gnu/lib/libmaster.a(libos_interface.o)
 to 248 in /usr/sw-mpp/lib/libos_master_isp.a(libos_interface.o)
/usr/sw-mpp/swcc/sw5gcc-binary/bin/../lib/gcc/alphaev6-unknown-linux-gnu/4.1.2/../../../../alphaev6-unknown-linux-gnu/bin/ld:
 attempted static link of dynamic object 
`/usr/sw-mpp/swcc/swgcc-binary/alphaev6-unknown-linux-gnu/lib/libstdc++.so'
collect2: ld returned 1 exit status
make: *** [two_phase_ch_ns] Error 1



> -----原始邮件-----
> 发件人: "Roy Stogner" <royst...@ices.utexas.edu>
> 发送时间: 2016年5月26日 星期四
> 收件人: "Paul T. Bauman" <ptbau...@gmail.com>
> 抄送: li....@siat.ac.cn, "libmesh-users@lists.sourceforge.net" 
> <libmesh-users@lists.sourceforge.net>
> 主题: Re: [Libmesh-users] Fw: Some debugging, linking, running problems
> 
> 
> On Wed, 25 May 2016, Paul T. Bauman wrote:
> 
> >> 1, How can I configure a debugging version of libmesh? It seems there is
> >> not such an option when configure -h,  I added "--with-debugging=yes" to
> >> the configure command as I did for PETSc, it seems that this can generate a
> >> debug verion of libmesh, but I am not sure.
> >
> > Setting the environment variable (or on the configure line) METHOD=devel
> > will turn on asserts and debugging flags, but will still have -O2.
> > METHOD=dbg will use -O0 and some other debugging flags. I use METHOD=devel
> > the vast majority of the time. Only occasionally do I need to use
> > METHOD=dbg.
> 
> If you don't do anything at all, the default behavior is 
> "METHODS='dbg devel opt'", which simultaneously builds versions of
> libmesh with ridiculous levels of debugging enabled, sane levels of
> debugging enabled, and no debugging enabled, respectively.
> 
> >> 2, It outputs an error when I install libmesh: "attempted static link with
> >> libstdc++.so", how can I link this lib correctly?
> 
> We never add this library to the link line ourselves - it would be
> redundant since we use C++ compilers to link.  We do pull in linker
> options from other packages, like PETSc; you can examine configure
> logs to see which is including that entry.
> 
> By the way - is the text in quotation marks an exact quotation, or a
> paraphrase?  It looks like the latter, but paraphrasing compiler error
> messages is never a good idea; Google doesn't work well that way.
> ---
> Roy



--
Li Luo
https://sites.google.com/site/rolyliluo/
Shenzhen Institutes of Advanced Technology 
Address: 1068 Xueyuan Avenue, Shenzhen University Town, Shenzhen, P.R.China
Tel: +86-15899753087
li....@siat.ac.cn





------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to