Unfortunately that didn't help<br>Anyway, thanks for your help.<br><br>Thanks<br><br><div class="gmail_quote">2009/10/19 Mário Costa <span dir="ltr"><<a href="mailto:mario.silva.costa@gmail.com">mario.silva.costa@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">>From what I can see you are using dynamic compiling in your<br>
application, and I would guess that your mpich compilers have a<br>
default configuration to use static liking with the mpich libraries,<br>
you can check that with the mpichversion or similar command in the dir<br>
/opt/mpich/gnu/bin/ .<br>
<br>
If your application can compile statically try changing<br>
<br>
OPT=-O3 -fPIC -D__IC_SMS to<br>
OPT=-O3 -static -D__IC_SMS<br>
<br>
and<br>
<br>
LRT_LDFLAGS=-rdynamic $(OPT) to<br>
LRT_LDFLAGS= $(OPT)<br>
<br>
Hope this helps<br>
<div><div></div><div class="h5"><br>
On Mon, Oct 19, 2009 at 2:58 PM, Luís Miranda <<a href="mailto:luistm@gmail.com">luistm@gmail.com</a>> wrote:<br>
> This is the makefile i use:<br>
><br>
> ARCH = $(shell uname)<br>
> LEX=flex<br>
> YACC=bison -d -v -t<br>
> LEXLIB = -lfl<br>
> DLLLIB = -ldl<br>
> ifeq ($(ARCH),Darwin)<br>
> DLLLIB =<br>
> endif<br>
> ifeq ($(ARCH),OpenBSD)<br>
> DLLLIB =<br>
> endif<br>
><br>
> EXRINCLUDE=-I/export3/home/lmiranda/.usr/include/OpenEXR<br>
> EXRLIBDIR=-L/export3/home/lmiranda/.usr/lib<br>
><br>
> #EXRINCLUDE=-I/export3/home/lmiranda/Sources/par-pbrt/src/OpenEXR/include<br>
> #EXRLIBDIR=-L/export3/home/lmiranda/Sources/par-pbrt/src/OpenEXR/liblinux<br>
><br>
><br>
><br>
> #EXRLIBS=$(EXRLIBDIR) -Bstatic -lIex -lIlmImf -lImath -lIex -lHalf -Bdynamic<br>
> -lz<br>
><br>
><br>
> ifeq ($(ARCH),Linux)<br>
> EXRLIBS += -lpthread<br>
> endif<br>
><br>
><br>
> #CC=gcc<br>
> #CXX=g++<br>
> #CC=/opt/mpich-mx/bin/mpicc<br>
> #CXX=/opt/mpich-mx/bin/mpicxx<br>
> #CC=/opt/mpich/intel/bin/mpiCC<br>
> #CXX=/opt/mpich/intel/bin/mpicxx<br>
> CC=/opt/mpich/gnu/bin/mpicc<br>
> CXX=/opt/mpich/gnu/bin/mpicxx<br>
><br>
> #CC=/export3/home/lmiranda/.opt/openmpi/bin/mpicc<br>
> #CXX=/export3/home/lmiranda/.opt/openmpi/bin/mpicxx<br>
><br>
> #CC=/export3/home/lmiranda/.opt/mpich2/bin/mpicc<br>
> #CXX=/export3/home/lmiranda/.opt/mpich2/bin/mpicxx<br>
><br>
><br>
> #CC= /opt/mpich/myrinet/gnu/bin/mpicc<br>
> #CXX= /opt/mpich/myrinet/gnu/bin/mpicxx<br>
> LD=$(CXX) $(OPT)<br>
><br>
><br>
> #v0.4######################################<br>
> #OPT=-O3 -fPIC<br>
> OPT=-O3 -fPIC -D__IC_SMS<br>
> #OPT=-O3 -fPIC -D__AU_L<br>
> #OPT=-O3 -fPIC -pthread -D__AU_L_2T<br>
> #OPT=-O3 -fPIC -pthread -D__AB_L_2T<br>
> #OPT=-O3 -fPIC -D__AB_L<br>
> #OPT=-O3 -fPIC -D__OTA<br>
><br>
> #v0.2.1 & v0.3######################################<br>
> #OPT=-O3 -fPIC -D__IC_SMS<br>
> #OPT=-O3 -fPIC -pthread -D__ALC<br>
> #OPT=-O3 -fPIC -D__AU<br>
> #OPT=-O3 -fPIC -D__AU-L<br>
><br>
> #OPT=-O3 -fPIC -D__AB<br>
> #OPT=-O3 -fPIC -D__AB2<br>
> #OPT=-O3 -fPIC -D__AB-L<br>
><br>
><br>
> #OPT=-O3 -fPIC -D__AL<br>
> #OPT=-O3 -fPIC -D__AL2<br>
> #OPT=-O3 -fPIC -D__ALL<br>
><br>
> #v0.2##############################################<br>
> #OPT=-O3 -fPIC -D__AB1<br>
> #OPT=-O3 -fPIC -lm -D__AB2<br>
> #OPT=-O3 -fPIC -lm -D__AU<br>
> #OPT=-O3 -fPIC -lm -D__AU2<br>
> #OPT=-O3 -fPIC -lm -D__LR<br>
><br>
> #ORIGINAL#########################################<br>
> #OPT=-O3 -fPIC<br>
> #OPT=-O3<br>
> # OPT=-O2 -msse -mfpmath=sse<br>
> INCLUDE=-I. -Icore $(EXRINCLUDE)<br>
> WARN=-Wall<br>
> CWD=$(shell pwd)<br>
> CXXFLAGS=$(OPT) $(INCLUDE) $(WARN)<br>
> CCFLAGS=$(CXXFLAGS)<br>
> LIBS=$(LEXLIB) $(DLLLIB) $(EXRLIBDIR) $(EXRLIBS) -lm<br>
><br>
> SHARED_LDFLAGS = -shared<br>
> LRT_LDFLAGS=-rdynamic $(OPT)<br>
> #PBRTPRELINK=-Wl,--export-dynamic -Wl,-whole-archive<br>
> #PBRTPOSTLINK=-Wl,-no-whole-archive<br>
><br>
> ifeq ($(ARCH), Darwin)<br>
> OS_VERSION = $(shell uname -r)<br>
> SHARED_LDFLAGS = -flat_namespace -undefined suppress -bundle -noprebind<br>
> LRT_LDFLAGS=$(OPT) # -L/sw/lib<br>
> INCLUDE += -I/sw/include<br>
> WARN += -Wno-long-double<br>
> endif<br>
><br>
> ACCELERATORS = grid kdtree<br>
> CAMERAS = environment orthographic perspective<br>
> CORE = api camera color dynload exrio film geometry light material<br>
> mc \<br>
> paramset parser primitive reflection sampling scene shape \<br>
> texture timer transform transport util volume pbrtparse<br>
> pbrtlex<br>
> FILM = image<br>
> FILTERS = box gaussian mitchell sinc triangle<br>
> INTEGRATORS = directlighting emission irradiancecache \<br>
> path photonmap single whitted igi debug exphotonmap<br>
> LIGHTS = area distant goniometric infinite point projection spot<br>
> infinitesample<br>
> MATERIALS = bluepaint brushedmetal clay felt \<br>
> glass matte mirror plastic primer \<br>
> shinymetal skin substrate translucent uber<br>
> SAMPLERS = bestcandidate lowdiscrepancy random stratified<br>
> SHAPES = cone cylinder disk heightfield hyperboloid loopsubdiv nurbs \<br>
> paraboloid sphere trianglemesh<br>
> TEXTURES = bilerp checkerboard constant dots fbm imagemap marble mix \<br>
> scale uv windy wrinkled<br>
> TONEMAPS = contrast highcontrast maxwhite nonlinear<br>
> VOLUMES = exponential homogeneous volumegrid<br>
><br>
> RENDERER = pbrt<br>
><br>
><br>
><br>
> RENDERER_OBJS := $(addprefix objs/, $(RENDERER:=.o) )<br>
> CORE_OBJS := $(addprefix objs/, $(CORE:=.o) )<br>
> CORE_LIB := core/libpbrt.a<br>
><br>
> SHAPES_DSOS := $(addprefix bin/, $(SHAPES:=.so))<br>
> MATERIALS_DSOS := $(addprefix bin/, $(MATERIALS:=.so))<br>
> LIGHTS_DSOS := $(addprefix bin/, $(LIGHTS:=.so))<br>
> INTEGRATORS_DSOS := $(addprefix bin/, $(INTEGRATORS:=.so))<br>
> VOLUMES_DSOS := $(addprefix bin/, $(VOLUMES:=.so))<br>
> TEXTURES_DSOS := $(addprefix bin/, $(TEXTURES:=.so))<br>
> ACCELERATORS_DSOS := $(addprefix bin/, $(ACCELERATORS:=.so))<br>
> CAMERAS_DSOS := $(addprefix bin/, $(CAMERAS:=.so))<br>
> FILTERS_DSOS := $(addprefix bin/, $(FILTERS:=.so))<br>
> FILM_DSOS := $(addprefix bin/, $(FILM:=.so))<br>
> TONEMAPS_DSOS := $(addprefix bin/, $(TONEMAPS:=.so))<br>
> SAMPLERS_DSOS := $(addprefix bin/, $(SAMPLERS:=.so))<br>
><br>
> SHAPES_OBJS := $(addprefix objs/, $(SHAPES:=.o))<br>
> MATERIALS_OBJS := $(addprefix objs/, $(MATERIALS:=.o))<br>
> LIGHTS_OBJS := $(addprefix objs/, $(LIGHTS:=.o))<br>
> INTEGRATORS_OBJS := $(addprefix objs/, $(INTEGRATORS:=.o))<br>
> VOLUMES_OBJS := $(addprefix objs/, $(VOLUMES:=.o))<br>
> TEXTURES_OBJS := $(addprefix objs/, $(TEXTURES:=.o))<br>
> ACCELERATORS_OBJS := $(addprefix objs/, $(ACCELERATORS:=.o))<br>
> CAMERAS_OBJS := $(addprefix objs/, $(CAMERAS:=.o))<br>
> FILTERS_OBJS := $(addprefix objs/, $(FILTERS:=.o))<br>
> FILM_OBJS := $(addprefix objs/, $(FILM:=.o))<br>
> TONEMAPS_OBJS := $(addprefix objs/, $(TONEMAPS:=.o))<br>
> SAMPLERS_OBJS := $(addprefix objs/, $(SAMPLERS:=.o))<br>
><br>
> RENDERER_BINARY = bin/pbrt<br>
><br>
> CORE_HEADERFILES = api.h camera.h color.h dynload.h film.h geometry.h \<br>
> kdtree.h light.h pbrt.h material.h mc.h mipmap.h octree.h<br>
> \<br>
> paramset.h primitive.h reflection.h sampling.h scene.h \<br>
> shape.h texture.h timer.h tonemap.h transform.h<br>
> transport.h \<br>
> volume.h<br>
><br>
> CORE_HEADERS := $(addprefix core/, $(CORE_HEADERFILES) )<br>
><br>
> .SECONDARY: $(SHAPES_OBJS) $(MATERIALS_OBJS) $(LIGHTS_OBJS)<br>
> $(INTEGRATORS_OBJS) \<br>
> $(VOLUMES_OBJS) $(ACCELERATORS_OBJS) $(CAMERAS_OBJS)<br>
> $(FILTERS_OBJS) \<br>
> $(FILM_OBJS) $(TONEMAPS_OBJS) $(SAMPLERS_OBJS) $(TEXTURES_OBJS)<br>
><br>
> .PHONY: tools exrcheck<br>
><br>
> default: $(CORE_LIB) $(RENDERER_BINARY) $(INTEGRATORS_DSOS) $(VOLUMES_DSOS)<br>
> $(FILM_DSOS) $(SHAPES_DSOS) $(MATERIALS_DSOS) $(LIGHTS_DSOS)<br>
> $(ACCELERATORS_DSOS) $(CAMERAS_DSOS) $(SAMPLERS_DSOS) $(FILTERS_DSOS)<br>
> $(TONEMAPS_DSOS) $(TEXTURES_DSOS) #tools<br>
><br>
> tools: $(CORE_LIB)<br>
> (cd tools && $(MAKE))<br>
><br>
> $(CORE_LIB): $(CORE_OBJS)<br>
> @echo "Building the core rendering library (libpbrt.a)"<br>
> @ar rcs $(CORE_LIB) $(CORE_OBJS)<br>
><br>
> bin/%.so: objs/%.o<br>
> @$(LD) $(SHARED_LDFLAGS) $^ -o $@<br>
><br>
> objs/%.o: renderer/%.cpp $(CORE_HEADERS)<br>
> @echo "Building the rendering binary (pbrt)"<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: core/%.cpp $(CORE_HEADERS)<br>
> @echo "Compiling $<"<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: core/%.c $(CORE_HEADERS)<br>
> @echo "Compiling $<"<br>
> @$(CC) $(CCFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: shapes/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Shape Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: integrators/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Integrator Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: volumes/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Volume Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: textures/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Texture Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: materials/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Material Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: lights/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Light Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: accelerators/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Accelerator Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: cameras/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Camera Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: filters/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Filter Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: tonemaps/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Tone Map Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: film/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Film Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> objs/%.o: samplers/%.cpp $(CORE_HEADERS)<br>
> @echo "Building Sampler Plugin \"$*\""<br>
> @$(CXX) $(CXXFLAGS) -o $@ -c $<<br>
><br>
> core/pbrtlex.cpp: core/pbrtlex.l<br>
> @echo "Lex'ing pbrtlex.l"<br>
> @$(LEX) -o$@ core/pbrtlex.l<br>
><br>
> core/pbrtparse.h core/pbrtparse.cpp: core/pbrtparse.y<br>
> @echo "YACC'ing pbrtparse.y"<br>
> @$(YACC) -o $@ core/pbrtparse.y<br>
> @if [ -e core/pbrtparse.cpp.h ]; then /bin/mv core/pbrtparse.cpp.h<br>
> core/pbrtparse.h; fi<br>
> @if [ -e core/pbrtparse.hpp ]; then /bin/mv core/pbrtparse.hpp<br>
> core/pbrtparse.h; fi<br>
><br>
> $(RENDERER_BINARY): $(RENDERER_OBJS) $(CORE_LIB)<br>
> @echo "Linking $@"<br>
> @$(CXX) $(LRT_LDFLAGS) -o $@ $(RENDERER_OBJS) $(PBRTPRELINK)<br>
> $(CORE_OBJS) $(PBRTPOSTLINK) $(LIBS)<br>
><br>
> clean:<br>
> rm -f */*.o */*.so */*.a bin/pbrt core/pbrtlex.[ch]*<br>
> core/pbrtparse.[ch]*<br>
> (cd tools && $(MAKE) clean)<br>
><br>
> objs/exrio.o: exrcheck<br>
><br>
> exrcheck:<br>
> @echo -n Checking for EXR installation...<br>
> @$(CXX) $(CXXFLAGS) -o exrcheck exrcheck.cpp $(LIBS) || \<br>
> (cat exrinstall.txt; exit 1)<br>
><br>
><br>
><br>
><br>
><br>
><br>
> 2009/10/19 Mário Costa <<a href="mailto:mario.silva.costa@gmail.com">mario.silva.costa@gmail.com</a>><br>
>><br>
>> Maybe if you can post the build script or part of it where you<br>
>> compile, and have the flag and library definition e could try to<br>
>> identify what might be wrong...<br>
>><br>
>> Regards,<br>
>> Mario<br>
>><br>
>> On Mon, Oct 19, 2009 at 2:40 PM, Luís Miranda <<a href="mailto:luistm@gmail.com">luistm@gmail.com</a>> wrote:<br>
>> > Well, thanks for the suggestion, but the problem is still happening.<br>
>> ><br>
>> ><br>
>> > Thanks<br>
>> ><br>
>> > 2009/10/19 Mário Costa <<a href="mailto:mario.silva.costa@gmail.com">mario.silva.costa@gmail.com</a>><br>
>> >><br>
>> >> Hi,<br>
>> >><br>
>> >> The problem is that the irradiancecache.so library is dynamic, and you<br>
>> >> are using mpich static library version libpmpich++.a.<br>
>> >><br>
>> >> Either you are compiling with -static with gnu, or you are specifying<br>
>> >> the static library libpmpich++.a.<br>
>> >><br>
>> >> If that is the case remove the -static flag from gnu compiler in the<br>
>> >> byuild script, or use -lmpich++ instead of the library ...<br>
>> >><br>
>> >> Hope this helps,<br>
>> >> Regards,<br>
>> >> Mário<br>
>> >><br>
>> >> On Mon, Oct 19, 2009 at 11:56 AM, Luís Miranda <<a href="mailto:luistm@gmail.com">luistm@gmail.com</a>><br>
>> >> wrote:<br>
>> >> > Hi<br>
>> >> ><br>
>> >> > I'm having this problem, when i try to compile my software in a<br>
>> >> > rocks4.2<br>
>> >> > cluster.<br>
>> >> ><br>
>> >> > /usr/bin/ld: /opt/mpich/myrinet/gnu/lib/libpmpich++.a(intercepts.o):<br>
>> >> > relocation R_X86_64_32S against `a local symbol' can not be used when<br>
>> >> > making<br>
>> >> > a shared object; recompile with -fPIC<br>
>> >> > /opt/mpich/myrinet/gnu/lib/libpmpich++.a: could not read symbols: Bad<br>
>> >> > value<br>
>> >> > collect2: ld returned 1 exit status<br>
>> >> > make: *** [bin/irradiancecache.so] Error 1<br>
>> >> ><br>
>> >> > A solution to the problem, isto to compile the mpich with<br>
>> >> > CFLAGS=-fPIC,<br>
>> >> > but<br>
>> >> > i can't do this, becouse i'm not the cluster's admin.<br>
>> >> > Anyone knows any other workaround to the problem?<br>
>> >> ><br>
>> >> > Thanks<br>
>> >> ><br>
>> >> > _______________________________________________<br>
>> >> > mpich-discuss mailing list<br>
>> >> > <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> >> > <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>> >> ><br>
>> >> ><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Mário Costa<br>
>> >><br>
>> >> Laboratório Nacional de Engenharia Civil<br>
>> >> LNEC.CTI.NTIEC<br>
>> >> Avenida do Brasil 101<br>
>> >> 1700-066 Lisboa, Portugal<br>
>> >> Tel : ++351 21 844 3911<br>
>> >> _______________________________________________<br>
>> >> mpich-discuss mailing list<br>
>> >> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> >> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > mpich-discuss mailing list<br>
>> > <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> > <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> mpich-discuss mailing list<br>
>> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
>> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
><br>
><br>
> _______________________________________________<br>
> mpich-discuss mailing list<br>
> <a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
> <a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
><br>
><br>
_______________________________________________<br>
mpich-discuss mailing list<br>
<a href="mailto:mpich-discuss@mcs.anl.gov">mpich-discuss@mcs.anl.gov</a><br>
<a href="https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss" target="_blank">https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss</a><br>
</div></div></blockquote></div><br>