Re: Unable to disable shared-libraries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, --disable-shared does does its job - NOT generating .so files.
Also, just realized that .la file is a mere text file, nothing more.

So, the breakages I am getting are solely due to not using
default-libraries for linking.. looking into it.

Sorry for the noise.



On Tue, Jun 12, 2018 at 6:34 PM, Ajay Garg <ajaygargnsit@xxxxxxxxx> wrote:
> Hi Xi.
>
> Thanks for the help.
>
>
> I did the following :
>
> #####################################################
> ./configure --prefix=/usr --disable-shared
>
> make CFLAGS='-g -O2 -nostartfiles -nodefaultlibs -nostdlib -static'
> CXXFLAGS='-nostartfiles -nodefaultlibs -nostdlib -static'
> CPPFLAGS='-nostartfiles -nodefaultlibs -nostdlib -static' LIBS='
> /newlib/newlib/libc.a  '
> #####################################################
>
>
> But I still get,
>
> #####################################################
> *** Warning: Linking the shared library liblept.la against the
> *** static library /newlib/newlib/libc.a is not portable!
> #####################################################
>
>
> Also, this file is actually generated :
>
> #####################################################
> \u@\h:\w$ find . -name liblept.la
> ./src/liblept.la
> ./src/.libs/liblept.la
> #####################################################
>
>
> I am using a ARM64 machine.
>
> Any ideas what might be going wrong?
>
>
> Thanks and Regards,
> Ajay
>
> On Tue, Jun 12, 2018 at 6:06 PM, Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx> wrote:
>> On 2018-06-12 20:29 +0800, Xi Ruoyao wrote:
>>> On 2018-06-12 17:46 +0530, Ajay Garg wrote:
>>> > Oh, sorry for that (and thanks for the quick reply ..).
>>> >
>>> > Just a quick-question, is there a gcc option that can disable
>>> > compilation of *any* shared-libraries at gcc's level?
>>>
>>> You can write a shell script wrapping GCC to do that.  But I don't think it
>>> would be useful as the building process won't continue because of missing
>>> libraries.
>>>
>>> leptonica's CMake building system seems to use "cmake -DSTATIC=yes".  And its
>>> Makefile (src/makefile.static) doesn't produce shared libraries by default
>>> (DON'T -DSHARED=no! just `make -f makefile.static`. It actually just tests
>>> if SHARED is defined and doesn't check the value).  For autoconf building
>>> system (configure script) --disable-shared should work.
>>
>> I tested leptonica-1.76.0 and '--disable-shared' works.
>>
>> Maybe the warning you seen is just a false warning from libtool.
>> `find -name \*.so` after `make` finishes to see if there is a liblept.so.
>> --
>> Xi Ruoyao <ryxi@xxxxxxxxxxxxxxxxx>
>> School of Aerospace Science and Technology, Xidian University



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux