[Bioperl-l] [Gmod-gbrowse] Installing Bio::DB::BigWig ?

Dan Bolser dan.bolser at gmail.com
Thu Oct 7 19:58:40 UTC 2010


On 7 October 2010 19:52, Lincoln Stein <lincoln.stein at gmail.com> wrote:
> Sorry, I'll fix the installation documentation to warn people about -fPIC.
> This seems to be needed on some platforms and not others.

No problem, thanks for the update. Perhaps it should also be added to
the jkucsc code? any harm in adding -fPIC there anyway?

Here are the details of my box:

ge-002 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 11:57:43 EST 2008 x86_64
x86_64 x86_64 GNU/Linux

gcc --version
gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
Copyright (C) 2006 Free Software Foundation, Inc.

perl --version
This is perl, v5.8.8 built for x86_64-linux-thread-multi

jkucsc ... git rev-parse HEAD
cb419933fdc44246e6bac605e65ddc27e7683559


I made some other minor changes to the jkucsc code in an attempt to
get the whole lot to compile:

diff --git a/src/inc/common.mk b/src/inc/common.mk
index 65c9f3c..b7b5389 100644
--- a/src/inc/common.mk
+++ b/src/inc/common.mk
@@ -3,7 +3,7 @@ CC=gcc
 ifeq (${COPT},)
     COPT=-O -g
 endif
-CFLAGS=
+CFLAGS=-fPIC
 HG_DEFS=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DMACHTYPE_${M
 HG_INC=-I../inc -I../../inc -I../../../inc -I../../../../inc -I../../../../../i

diff --git a/src/oneShot/smoothWindow/smoothWindow.c b/src/oneShot/smoothWindow/
index b062c91..f0d9c49 100644
--- a/src/oneShot/smoothWindow/smoothWindow.c
+++ b/src/oneShot/smoothWindow/smoothWindow.c
@@ -80,9 +80,9 @@ while (lineFileNext(lf, &line, NULL))
     val = words[1];
     dataValue = strtod(val, &valEnd);
     if ((*val == '\0') || (*valEnd != '\0'))
-       errAbort("Not a valid float at line %d: %s\n", lineCount, words[1]);
+       errAbort("Not a valid float at line %llu: %s\n", lineCount, words[1]);
     if (Offset < 1)
-       errAbort("Illegal offset: %llu at line %d, dataValue: %g", Offset,
+       errAbort("Illegal offset: %llu at line %llu, dataValue: %g", Offset,
            lineCount, dataValue);
     verbose(3, "#\tline: %llu, offset: %llu, data: %g\n",
        lineCount, Offset, dataValue);
diff --git a/src/utils/wigAsciiCrunch/wigAsciiCrunch.c b/src/utils/wigAsciiCrunc
index 04f7692..fc86036 100644
--- a/src/utils/wigAsciiCrunch/wigAsciiCrunch.c
+++ b/src/utils/wigAsciiCrunch/wigAsciiCrunch.c
@@ -103,7 +103,7 @@ while ((wordCount = lineFileChop(lf, words)) != 0)
        if (clFixOverlap)
            {
            minPos = lastOffset;
-           verbose(1, "Removing overlap %d-%d line %d of %s\n",
+           verbose(1, "Removing overlap %ld-%ld line %d of %s\n",
                    lastOffset, offset, lf->lineIx, lf->fileName);
            }
        else


Thanks again,
Dan.

# fun for everyone!
irc://irc.perl.org/#gmod

#also good!
irc://irc.freenode.net/#bioperl


> Lincoln
>
> On Thu, Oct 7, 2010 at 11:01 AM, Dan Bolser <dan.bolser at gmail.com> wrote:
>>
>> I finally found the solution to this install problem. The error
>> message 'recompile with -fPIC' isn't referring to the Perl code, but
>> rather the jkucsc code...
>>
>> In the directory .../src/kent/src/inc I changed the file common.mk to
>> add the -fPIC option to the CFLAGS...
>>
>> [me at box inc]$ diff common.mk~ common.mk
>> 6c6
>> < CFLAGS=
>> ---
>> > CFLAGS=-fPIC
>>
>>
>> I then went back to .../src/kent/src/lib and hit 'make clean && make'.
>> Finally, going back to cpan, and re-installing Bio::DB::BigWig,
>> everything worked.
>>
>>
>> Sorry for the confusion, but it's been a long time since I needed to
>> install anything 'manually' ;-)
>>
>> Dan.
>>
>> # fun for everyone!
>> irc://irc.perl.org/#gmod
>>
>> #also good!
>> irc://irc.freenode.net/#bioperl
>>
>>
>> On 7 October 2010 15:22, Dan Bolser <dan.bolser at gmail.com> wrote:
>> > Trying to run make in .../src/kent/src (also CC'ing BP)
>> >
>> > Dan.
>> >
>> > # fun for everyone!
>> > irc://irc.perl.org/#gmod
>> >
>> > #also good!
>> > irc://irc.freenode.net/#bioperl
>> >
>> > On 7 October 2010 13:57, Dan Bolser <dan.bolser at gmail.com> wrote:
>> >> Hi,
>> >>
>> >> I'm having trouble installing Bio::DB::BigWig.
>> >>
>> >> I grabbed the jkucsc code as described here [1] and built it
>> >> successfully after setting 'export MACHTYPE=x86_64'.
>> >>
>> >> I then set 'export KENT_SRC=.../src/kent/src' and called:
>> >> cpan[1]> install Bio::DB::BigWig
>> >>
>> >> The error comes:
>> >> ...
>> >> lib/Bio/DB/BigFile.xs:320: warning: unused variable ‘i’
>> >> lib/Bio/DB/BigFile.xs: In function
>> >> ‘XS_Bio__DB__bbiFile_bigWigSummaryArrayExtended’:
>> >> lib/Bio/DB/BigFile.xs:358: warning: comparison is always false due to
>> >> limited range of data type
>> >> lib/Bio/DB/BigFile.xs:358: warning: operation on ‘summary’ may be
>> >> undefined
>> >> lib/Bio/DB/BigFile.xs:354: warning: unused variable ‘summaryList’
>> >> lib/Bio/DB/BigFile.xs: In function
>> >> ‘XS_Bio__DB__bbiFile_bigBedSummaryArrayExtended’:
>> >> lib/Bio/DB/BigFile.xs:395: warning: comparison is always false due to
>> >> limited range of data type
>> >> lib/Bio/DB/BigFile.xs:395: warning: operation on ‘summary’ may be
>> >> undefined
>> >> lib/Bio/DB/BigFile.xs:391: warning: unused variable ‘summaryList’
>> >> lib/Bio/DB/BigFile.xs: In function ‘XS_Bio__DB__bbiFile_chromList’:
>> >> lib/Bio/DB/BigFile.xs:424: warning: operation on ‘RETVAL’ may be
>> >> undefined
>> >> lib/Bio/DB/BigFile.xs: In function
>> >> ‘XS_Bio__DB__bbiFile_bigBedIntervalQuery’:
>> >> lib/Bio/DB/BigFile.xs:450: warning: operation on ‘list’ may be
>> >> undefined
>> >>
>> >> ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/Bio/DB/BigFile/BigFile.bs')
>> >> gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
>> >> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o
>> >> blib/arch/auto/Bio/DB/BigFile/BigFile.so lib/Bio/DB/BigFile.o
>> >> .../src/kent/src/lib/x86_64/jkweb.a -lz
>> >> /usr/bin/ld: .../src/kent/src/lib/x86_64/jkweb.a(bbiRead.o):
>> >> relocation R_X86_64_32S against `a local symbol' can not be used when
>> >> making a shared object; recompile with -fPIC
>> >> .../src/kent/src/lib/x86_64/jkweb.a: could not read symbols: Bad value
>> >> collect2: ld returned 1 exit status
>> >> error building blib/arch/auto/Bio/DB/BigFile/BigFile.so from
>> >> lib/Bio/DB/BigFile.o at
>> >> /usr/lib/perl5/site_perl/5.8.8/ExtUtils/CBuilder/Base.pm line 244.
>> >>  LDS/Bio-BigFile-1.03.tar.gz
>> >>  ./Build -- NOT OK
>> >> ...
>> >>
>> >>
>> >> I tried to 'recompile with -fPIC', but saw further errors about
>> >> missing symbols that I can't fix.
>> >>
>> >> Are there some specific applications of the jkucsc package that I
>> >> should build and install first?
>> >>
>> >>
>> >> Thanks for any help,
>> >> Dan.
>> >>
>> >>
>> >> [1] http://genome.ucsc.edu/admin/git.html
>> >>
>> >
>>
>>
>> ------------------------------------------------------------------------------
>> Beautiful is writing same markup. Internet Explorer 9 supports
>> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
>> Spend less time writing and  rewriting code and more time creating great
>> experiences on the web. Be a part of the beta today.
>> http://p.sf.net/sfu/beautyoftheweb
>> _______________________________________________
>> Gmod-gbrowse mailing list
>> Gmod-gbrowse at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse
>
>
>
> --
> Lincoln D. Stein
> Director, Informatics and Biocomputing Platform
> Ontario Institute for Cancer Research
> 101 College St., Suite 800
> Toronto, ON, Canada M5G0A3
> 416 673-8514
> Assistant: Renata Musa <Renata.Musa at oicr.on.ca>
>




More information about the Bioperl-l mailing list