Skip to Content.
Sympa Menu

charm - Re: [charm] [ppl] charm++ as shared library

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] [ppl] charm++ as shared library


Chronological Thread 
  • From: Gengbin Zheng <zhenggb AT gmail.com>
  • To: Andy Somogyi <somogyie AT umail.iu.edu>
  • Cc: charm AT cs.uiuc.edu
  • Subject: Re: [charm] [ppl] charm++ as shared library
  • Date: Tue, 23 Aug 2011 21:03:31 -0500
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi,

When you build charm, make sure you add -build-shared build option,
something like:

./build charm++ net-linux-x86_64 --build-shared -O3

now, when you compile a shared library for yourself, use -shared
compiler option, like:

../../../bin/charmc -shared -language charm++ -o hello.so hello.o

Gengbin

On Tue, Aug 23, 2011 at 7:50 PM, Andy Somogyi
<somogyie AT umail.iu.edu>
wrote:
> Hi all,
>
> trying to get a shared library built with charm++
>
> Built charm++ with --enable-shared
>
> after some serious hackery in the makefile, i.e. manually tracking down the
> linkage dependencies and so forth, I finally got a .so built.
>
> Now, down to one last problem:
>
> libconv-core.so: undefined symbol: __executable_start
>
> I'm building on x86_64 Linux, using gcc 4.1, only COPTS I have are -g -fPIC
>
> This actually works on OSX, and get a fully functional shared lib.
>
> I've also tried adding -L/MY_CHARM/charm/lib to the options below so the
> linker would pick up the .a static libs, and this fails with an error of
>
> mylib.so: undefined symbol: skt_connect
>
> which is odd since this symbol is defined in libconv-util.a, with an nm
> result of 0000000000000e51 T skt_connect
>
> my make section essentially looks like:
>
> mylib.so: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
>    $(CHARMC) -verbose -ld++-option \
>    "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \
>    "$(CHARM_MODULES)" -language charm++ \
>    $(OBJS) \
>    $(PYTHONLIBS) \
>    obj/SharedLibModuleInit.o \
>    $(HOME)/opt/charm/lib/libmemory-default.o \
>    $(HOME)/opt/charm/lib/libthreads-default.o \
>    $(HOME)/opt/charm/lib/libldb-neighbor.o \
>    -lsupc++ -lstdc++ \
>    -lck -lconv-util -lconv-core -lconv-cplus-y \
>    -lm -o mylib.so
>
> So, in any case, all I want is a shared lib (has to be a shared lib, it has
> lots of python extension types) that includes code that used charm++. Does
> not really matter if I statically or dynamically link with the charm++ libs.
>
> Any ideas... please?
>
>
>
> _______________________________________________
> charm mailing list
> charm AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/charm
> _______________________________________________
> ppl mailing list
> ppl AT cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/ppl
>



--
--------------------------------------------
 Gengbin Zheng,  Ph.D.
 Research Scientist
 Parallel Programming Laboratory
 Department of Computer Science
 University of Illinois at Urbana-Champaign
 201 N. Goodwin Ave.
 Urbana, IL 61801





Archive powered by MHonArc 2.6.16.

Top of Page