[Radiance-general] BSDFViewer - installation/update

Andre K andre.kostro at gmail.com
Wed Oct 26 02:07:18 PDT 2016


Hi,

i remember that i had problems with this in the past too. I got it working
in the end, but i cannot remember what was the key...  here is my modified
version of the install.sh file. Hope this can help.

While i m there, @ Andy, For the tensor tree visualization, is it normal
that you don't get the percent value for the outgoing patch when clicking
it (as you get for the Klems representation)

Best,
André


cd BSDFViewer

make -f Rmakefile clean
make -f Rmakefile all

g++ -shared -fPIC -o libBSDF.so addobjnotify.o badarg.o biggerlib.o
bmalloc.o \
bmpfile.o bsdf.o bsdf_m.o bsdf_t.o byteswap.o caldefn.o calexpr.o calfunc.o
\
calprnt.o ccolor.o ccyrgb.o chanvalue.o clip.o color.o colrops.o dircode.o \
disk2square.o ealloc.o eputs.o error.o expandarg.o ezxml.o falsecolor.o \
fdate.o fgetline.o fgetval.o fgetword.o font.o fputword.o fropen.o fvect.o \
gethomedir.o getlibpath.o getpath.o header.o hilbert.o invmat4.o \
lamps.o linregr.o loadbsdf.o lookup.o mat4.o mgf_context.o mgf_object.o \
mgf_parser.o mgf_xf.o multisamp.o myhostname.o objset.o octree.o \
paths.o plocate.o portio.o process.o quit.o readfargs.o resolu.o rexpr.o \
savestr.o savqstr.o spec_rgb.o tcos.o tmap16bit.o tmapcolrs.o tmesh.o
tonemap.o \
unix_process.o urand.o urind.o wordfile.o words.o wputs.o xf.o zeroes.o

javac libBSDF.java

javah -o libBSDF.h libBSDF

JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")

g++ -shared -fPIC -I$JAVA_HOME/include \
    -o libBSDF.o -c libBSDF.cpp

g++ -shared  -I$JAVA_HOME/include \
    -o libBSDF.jnilib libBSDF.o libBSDF.so


On Tue, Oct 25, 2016 at 9:00 PM, <
radiance-general-request at radiance-online.org> wrote:

> Send Radiance-general mailing list submissions to
>         radiance-general at radiance-online.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://www.radiance-online.org/mailman/listinfo/radiance-general
> or, via email, send a message with subject or body 'help' to
>         radiance-general-request at radiance-online.org
>
> You can reach the person managing the list at
>         radiance-general-owner at radiance-online.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Radiance-general digest..."
>
>
> Today's Topics:
>
>    1. BSDFViewer - installation (Paul?na ?ujanov?)
>    2. Re: BSDFViewer - installation/update (Paulina Sujanova)
>    3. Re: BSDFViewer - installation/update (Andy McNeil)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 25 Oct 2016 00:02:48 +0200
> From: Paul?na ?ujanov? <paulina.sujanova at stuba.sk>
> To: radiance-general at radiance-online.org
> Subject: [Radiance-general] BSDFViewer - installation
> Message-ID: <968d7032-fad4-c79d-e837-42fc34099a6e at stuba.sk>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Dear mailing list (most probably Andy McNeil),
>
> sorry for the _yet another installation proble__m_:
> I am not able to install the BSDFViewer (looked through all of the
> already given answers in the archives - without much progress).
>
> All works well until:
> /usr/bin/ld: badarg.o: relocation R_X86_64_32 against `.rodata.str1.1'
> can not be used when making a shared object; recompile with -fPIC
> badarg.o: error adding symbols: Bad value
> collect2: error: ld returned 1 exit status
> In file included from libBSDF.h:2:0,
>                   from libBSDF.cpp:13:
> /usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:45:20: fatal error:
> jni_md.h: No such file or directory
> compilation terminated.
> g++: error: libBSDF.o: No such file or directory
> g++: error: libBSDF.so: No such file or directory
> g++: fatal error: no input files
> compilation terminated.
> cp: cannot stat 'BSDFViewer/libBSDF.so': No such file or directory
>
> I did install the /java development environment/, well but further, I am
> not able to move.
>
> Thanks for any hints, and kind regards,
>
> Paul?na
>
> --
> Paul?na ?ujanov?
> PhD student
> Department of Building Construction
> Faculty of Civil Engineering
> Slovak University of Technology in Bratislava
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.radiance-online.org/pipermail/radiance-
> general/attachments/20161025/185ed746/attachment-0001.html>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 25 Oct 2016 13:06:07 +0200
> From: "Paulina Sujanova" <xsujanova at stuba.sk>
> To: <radiance-general at radiance-online.org>
> Subject: Re: [Radiance-general] BSDFViewer - installation/update
> Message-ID: <web-63668272 at stuba.sk>
> Content-Type: text/plain;charset=utf-8
>
> Dear all,
>
> in the meantime, I was able to get to just one error:
> g++: error: libbsdf.so: No such file or directory
> But I really am not anymore able to solve this. So please, please help.
>
> Kind regards,
>
> Paul?na
>
> On Tue, 25 Oct 2016 00:02:48 +0200
>  Paul?na ?ujanov? <paulina.sujanova at stuba.sk> wrote:
> >Dear mailing list (most probably Andy McNeil),
> >
> >sorry for the _yet another installation proble__m_:
> >I am not able to install the BSDFViewer (looked through all of the already
> >given answers in the archives - without much progress).
> >
> >All works well until:
> >/usr/bin/ld: badarg.o: relocation R_X86_64_32 against `.rodata.str1.1'
> can not
> >be used when making a shared object; recompile with -fPIC
> >badarg.o: error adding symbols: Bad value
> >collect2: error: ld returned 1 exit status
> >In file included from libBSDF.h:2:0,
> >                  from libBSDF.cpp:13:
> >/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:45:20: fatal error:
> jni_md.h:
> >No such file or directory
> >compilation terminated.
> >g++: error: libBSDF.o: No such file or directory
> >g++: error: libBSDF.so: No such file or directory
> >g++: fatal error: no input files
> >compilation terminated.
> >cp: cannot stat 'BSDFViewer/libBSDF.so': No such file or directory
> >
> >I did install the /java development environment/, well but further, I am
> not
> >able to move.
> >
> >Thanks for any hints, and kind regards,
> >
> >Paul?na
> >
> >--
> >Paul?na ?ujanov?
> >PhD student
> >Department of Building Construction
> >Faculty of Civil Engineering
> >Slovak University of Technology in Bratislava
> >
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 25 Oct 2016 09:21:42 -0700
> From: Andy McNeil <mcneil.andrew at gmail.com>
> To: Radiance general discussion <radiance-general at radiance-online.org>
> Subject: Re: [Radiance-general] BSDFViewer - installation/update
> Message-ID:
>         <CAEFJVk9aupf8_B9jJ6d8goK1X7DRmoKWNZnggzVngOc
> E9PQZjw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Paulina,
> First, libBSDF is only needed for tensor tree BSDFs. If you only need to
> view klems BSDFs let me know and I can send you a version that doesn't
> support tensortree and will save all this extra hassle.
>
> Did you try adding the -fPIC flag to the g++ command for compiling the
> library? I've added and removed this flag a few times. It seems that some
> systems need it while other systems can't have it. I'm not a linux expert
> so I'm not sure why the difference, or how to spot the difference.
>
> Have you tried running as root?
> sudo bash /install.sh
> You'll might root permission to put the shared object in the /usr/lib
> (though I wouldn't expect it to be necessary).
>
> Can you check to see if /usr/lib even exists on your system? And that it
> contains libBSDF.so?
>
> Thanks,
> Andy
>
>
>
> On Tue, Oct 25, 2016 at 4:06 AM, Paulina Sujanova <xsujanova at stuba.sk>
> wrote:
>
> > Dear all,
> >
> > in the meantime, I was able to get to just one error:
> > g++: error: libbsdf.so: No such file or directory
> > But I really am not anymore able to solve this. So please, please help.
> >
> > Kind regards,
> >
> > Paul?na
> >
> > On Tue, 25 Oct 2016 00:02:48 +0200
> >  Paul?na ?ujanov? <paulina.sujanova at stuba.sk> wrote:
> > >Dear mailing list (most probably Andy McNeil),
> > >
> > >sorry for the _yet another installation proble__m_:
> > >I am not able to install the BSDFViewer (looked through all of the
> already
> > >given answers in the archives - without much progress).
> > >
> > >All works well until:
> > >/usr/bin/ld: badarg.o: relocation R_X86_64_32 against `.rodata.str1.1'
> > can not
> > >be used when making a shared object; recompile with -fPIC
> > >badarg.o: error adding symbols: Bad value
> > >collect2: error: ld returned 1 exit status
> > >In file included from libBSDF.h:2:0,
> > >                  from libBSDF.cpp:13:
> > >/usr/lib/jvm/java-8-openjdk-amd64/include/jni.h:45:20: fatal error:
> > jni_md.h:
> > >No such file or directory
> > >compilation terminated.
> > >g++: error: libBSDF.o: No such file or directory
> > >g++: error: libBSDF.so: No such file or directory
> > >g++: fatal error: no input files
> > >compilation terminated.
> > >cp: cannot stat 'BSDFViewer/libBSDF.so': No such file or directory
> > >
> > >I did install the /java development environment/, well but further, I am
> > not
> > >able to move.
> > >
> > >Thanks for any hints, and kind regards,
> > >
> > >Paul?na
> > >
> > >--
> > >Paul?na ?ujanov?
> > >PhD student
> > >Department of Building Construction
> > >Faculty of Civil Engineering
> > >Slovak University of Technology in Bratislava
> > >
> >
> >
> > _______________________________________________
> > Radiance-general mailing list
> > Radiance-general at radiance-online.org
> > http://www.radiance-online.org/mailman/listinfo/radiance-general
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://www.radiance-online.org/pipermail/radiance-
> general/attachments/20161025/430fdcf2/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>
> ------------------------------
>
> End of Radiance-general Digest, Vol 152, Issue 12
> *************************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20161026/c8972ce3/attachment.html>


More information about the Radiance-general mailing list