[Xorp-users] Builing xorp with --enable-shared vs --with-pic

Pavlin Radoslavov pavlin at ICSI.Berkeley.EDU
Tue Oct 7 16:33:46 PDT 2008


Jose Manuel dos Santos Calhariz <jose.spam at netvisao.pt> wrote:

> I don't know why but I didn't receive the 2 replys to my question.
> Copying from the archives.

Is your subscription email address <jose.spam at netvisao.pt> valid?

> Jose Manuel dos Santos Calhariz <jose.spam at netvisao.pt> wrote:
> 
> > > Hi
> > > 
> > > As I don't understand well the compiling process of xorp 1.5 so I have a
> > > question. 
> > > 
> > > What is the diference of building xorp using switch --enable-shared vs
> > > --with-pic in a Linux system.
> > > 
> > > If building xorp with snmp support it will generate shared libraries
> > > for mibs that are made with objects compiled without -fPIC.  This is a
> > > problem in Linux and even breaks on x86_84 systems.  
> > > 
> > > What is best? --enable-shared or with-pic
> > > 
> > > See bug report on Debian for more info
> > > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500325 
> > > 
> > >      Jose Calhariz
> 
> > What is the original issue you are trying to solve?
> > According to the above Debian bug report, I am guessing XORP failed
> > to compile on x86_64 machine with SNMP enabled.
> 
> > Did you try to use the following commands:
> >        ./configure --with-snmp --enable-shared
> >        gmake clean
> >        gmake
> 
> > The original text in xorp/ERRATA cited FreeBSD as one of the example
> > OS-es that have that problem. I just tried Ubuntu-7.10 on amd64, and
> > using --enable-shared fixed the problem for me.
> 
> The two options seams to work, --enable-shared and --with-pic.  I am
> asking what is the best option in the opinion of Xorp developers, as I
> am one of the persons building xorp to be released in Debian.  But
> this weekend I had to use a i386 machine for the tests.  It don't
> break the compilation but complains about non -fPIC code inside a
> shared library.
> 
> Now that my x86_64 machine is again working I can try it and be 100%
> certain that --enable-shared or --with-pic solve the problem.

The original advice in xorp/ERRATA was to use --enable-shared.
However, if --with-pic solves the problem, I think --enable-shared
is probably an overkill. Also, the --enable-shared solution hasn't
been tested in details (e.g., whether the libraries are installed
properly by "gmake install"), so it might be safer to go with the
--with-pic solution.

Pavlin

> 
> > Note that I used latest vanilla XORP code from CVS, including the
> > rev. 1.27 fix to the following file that I just applied:
> > http://cvsweb.xorp.org/cgi-bin/cvsweb.cgi/xorp/mibs/bgp4_mib_1657_bgp4pathattrtable.cc
> 
> I am using release 1.5 with some updates from CVS.
> 
> > Pavlin
> 
>     José Calhariz
> 
> -- 
> --
> 	E parte da cura o desejo de ser curado.
> 		-- Seneca, o jovem; filosofo romano4 a.C. ± 65 d.C.. 
> _______________________________________________
> Xorp-users mailing list
> Xorp-users at xorp.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-users



More information about the Xorp-users mailing list