From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a0c:8b5d:: with SMTP id d29mr7360645qvc.172.1599214465596; Fri, 04 Sep 2020 03:14:25 -0700 (PDT) X-Received: by 2002:aed:2083:: with SMTP id 3mr7577206qtb.233.1599214465472; Fri, 04 Sep 2020 03:14:25 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 4 Sep 2020 03:14:25 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=102.129.224.2; posting-account=RQUKDAoAAADVP2A7Lg7kQ0nIJx9ON4Ii NNTP-Posting-Host: 102.129.224.2 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1cd30615-64d0-4742-a5ec-f819d9ad5464o@googlegroups.com> Subject: Re: gtkada: recompile with -fPIC From: liyan white Injection-Date: Fri, 04 Sep 2020 10:14:25 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:60080 List-Id: On Friday, July 31, 2020 at 4:18:00 PM UTC+5:30, hreba wrote: > Hi, > > I am following the plugin scheme from the GNAT examples, using GTK. So I > need gtkada, and for proper tasking with that, gtkada_contributions. > From the Adacore site I grabbed the actual versions (2020) of (binary) > GNAT and gtkada. From Dmitry's site I took the gtkada_contributions > source code. > > The plugin scheme demands building standalone relocatable libraries > (loaded at runtime). So for making (on Linux) I call from a terminal: > gtkada-env.sh > export GTKADA_BUILD=relocatable > gprbuild -Pbase > My project file base.gpr withs gtkada_contributions_lib.gpr, which is > the original project file with the following additions: > for Library_Name use "gtkada_contributions"; > for Library_Dir use "lib"; > for Library_Kind use "relocatable"; > > The above gprbuild command now produces: > > Build Libraries > [gprlib] gtkada_contributions.lexch > [link library] libgtkada_contributions.so > /opt/GNAT/2020/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.3.1/ld: > /home/frank/Lib/Ada/gtkada_contributions/gdk-color-ihls.o: relocation > R_X86_64_32 against `.rodata' can not be used when making a shared > object; recompile with -fPIC > /opt/GNAT/2020/bin/../libexec/gcc/x86_64-pc-linux-gnu/9.3.1/ld: > /home/frank/Lib/Ada/gtkada_contributions/gdk-pixbuf-image.o: relocation > R_X86_64_32 against symbol `gdk__pixbuf__image__rgb_imageT' can not be > used when making a shared object; recompile with -fPIC > ... > and a lot of other, similar lines. > > Adding -fPIC to gtkada_contributions_lib.gpr (compiler switches) didn't > change anything, so I guess it is gtkada or even gtk which has to be > recompiled. Going ahead alone probably means hours of useless work with > the possible result of breaking my system. > > So how can I compile/link my project? > Will then future projects without relocatable libraries still compile > and link? > -- > Frank Hrebabetzky, Kronach +49 / 9261 / 950 0565