public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Need help buiding bfd shared library
@ 2022-08-03  6:09 Potharla, Rupesh
  2022-08-03  6:43 ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Potharla, Rupesh @ 2022-08-03  6:09 UTC (permalink / raw)
  To: Potharla, Rupesh via Binutils
  Cc: George, Jini Susan, Kumar N, Bhuvanendra, Parasuraman, Hariharan

[Public]

Hi,

I am working on building bfd shared library for my code changes. I tried with "configure --enable-shared=bfd" but BFD is creating static library only even with -enable-shared option .  Did I miss something ? Can someone help me with the instructions to build bfd shared library?

Regards,
Rupesh P


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-03  6:09 Need help buiding bfd shared library Potharla, Rupesh
@ 2022-08-03  6:43 ` Jan Beulich
  2022-08-03  6:49   ` Potharla, Rupesh
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2022-08-03  6:43 UTC (permalink / raw)
  To: Potharla, Rupesh
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
> I am working on building bfd shared library for my code changes. I tried with "configure --enable-shared=bfd" but BFD is creating static library only even with -enable-shared option .  Did I miss something ? Can someone help me with the instructions to build bfd shared library?

Did you try --enable-shared without "=bfd"? So far I wasn't aware of
that form as an option, and at least a quick inspection of the
configure script also doesn't suggest that form might exist. But I
may be entirely wrong ...

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Need help buiding bfd shared library
  2022-08-03  6:43 ` Jan Beulich
@ 2022-08-03  6:49   ` Potharla, Rupesh
  2022-08-03  6:58     ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Potharla, Rupesh @ 2022-08-03  6:49 UTC (permalink / raw)
  To: Jan Beulich
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

[AMD Official Use Only - General]

>
>On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>> I am working on building bfd shared library for my code changes. I tried with
>"configure --enable-shared=bfd" but BFD is creating static library only even
>with -enable-shared option .  Did I miss something ? Can someone help me
>with the instructions to build bfd shared library?
>
>Did you try --enable-shared without "=bfd"? So far I wasn't aware of that form
>as an option, and at least a quick inspection of the configure script also
>doesn't suggest that form might exist. But I may be entirely wrong ...
>

I tried that option as well and tried with --enable-host-shared combination also but no luck. 

Regards,
Rupesh P
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-03  6:49   ` Potharla, Rupesh
@ 2022-08-03  6:58     ` Jan Beulich
  2022-08-03 18:59       ` Potharla, Rupesh
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2022-08-03  6:58 UTC (permalink / raw)
  To: Potharla, Rupesh
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

On 03.08.2022 08:49, Potharla, Rupesh wrote:
>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>>> I am working on building bfd shared library for my code changes. I tried with
>> "configure --enable-shared=bfd" but BFD is creating static library only even
>> with -enable-shared option .  Did I miss something ? Can someone help me
>> with the instructions to build bfd shared library?
>>
>> Did you try --enable-shared without "=bfd"? So far I wasn't aware of that form
>> as an option, and at least a quick inspection of the configure script also
>> doesn't suggest that form might exist. But I may be entirely wrong ...
> 
> I tried that option as well and tried with --enable-host-shared combination also but no luck. 

You may want to inspect configure output then. Here in bfd/config.log I see

configure:8674: checking whether the gcc -std=gnu99 linker (/usr/lib/gcc/.../ld) supports shared libraries
configure:9745: result: yes
...
configure:11365: checking if libtool supports shared libraries
configure:11367: result: yes
configure:11370: checking whether to build shared libraries
configure:11391: result: yes
configure:11394: checking whether to build static libraries
configure:11398: result: yes

I would guess one of these is failing for you, at which point you'd want to
figure out why that is.

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Need help buiding bfd shared library
  2022-08-03  6:58     ` Jan Beulich
@ 2022-08-03 18:59       ` Potharla, Rupesh
  2022-08-04  6:46         ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Potharla, Rupesh @ 2022-08-03 18:59 UTC (permalink / raw)
  To: Jan Beulich
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

[Public]

>On 03.08.2022 08:49, Potharla, Rupesh wrote:
>>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>>>> I am working on building bfd shared library for my code changes. I
>>>> tried with
>>> "configure --enable-shared=bfd" but BFD is creating static library
>>> only even with -enable-shared option .  Did I miss something ? Can
>>> someone help me with the instructions to build bfd shared library?
>>>
>>> Did you try --enable-shared without "=bfd"? So far I wasn't aware of
>>> that form as an option, and at least a quick inspection of the
>>> configure script also doesn't suggest that form might exist. But I may be
>entirely wrong ...
>>
>> I tried that option as well and tried with --enable-host-shared combination
>also but no luck.
>
>You may want to inspect configure output then. Here in bfd/config.log I see
>
>configure:8674: checking whether the gcc -std=gnu99 linker
>(/usr/lib/gcc/.../ld) supports shared libraries
>configure:9745: result: yes
>...
>configure:11365: checking if libtool supports shared libraries
>configure:11367: result: yes
>configure:11370: checking whether to build shared libraries
>configure:11391: result: yes
>configure:11394: checking whether to build static libraries
>configure:11398: result: yes
>
>I would guess one of these is failing for you, at which point you'd want to
>figure out why that is.

None of the above is failing for me. I looked at the config.log file and tried the combination of different options none of them is working. In fact, I don't see a target for libbfd.so in the Makefile.  

configure:11283: checking whether stripping libraries is possible
configure:11288: result: yes
configure:11323: checking if libtool supports shared libraries
configure:11325: result: yes
configure:11328: checking whether to build shared libraries
configure:11349: result: yes
configure:11352: checking whether to build static libraries
configure:11356: result: yes
configure:8563: checking for dlfcn.h
configure:8563: result: yes

Just out of curiosity is the --enable-shared option really working for others?  Am I missing something during the compilation?

Regards,
Rupesh P

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-03 18:59       ` Potharla, Rupesh
@ 2022-08-04  6:46         ` Jan Beulich
  2022-08-04  9:45           ` Potharla, Rupesh
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2022-08-04  6:46 UTC (permalink / raw)
  To: Potharla, Rupesh
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

On 03.08.2022 20:59, Potharla, Rupesh wrote:
> [Public]
> 
>> On 03.08.2022 08:49, Potharla, Rupesh wrote:
>>>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>>>>> I am working on building bfd shared library for my code changes. I
>>>>> tried with
>>>> "configure --enable-shared=bfd" but BFD is creating static library
>>>> only even with -enable-shared option .  Did I miss something ? Can
>>>> someone help me with the instructions to build bfd shared library?
>>>>
>>>> Did you try --enable-shared without "=bfd"? So far I wasn't aware of
>>>> that form as an option, and at least a quick inspection of the
>>>> configure script also doesn't suggest that form might exist. But I may be
>> entirely wrong ...
>>>
>>> I tried that option as well and tried with --enable-host-shared combination
>> also but no luck.
>>
>> You may want to inspect configure output then. Here in bfd/config.log I see
>>
>> configure:8674: checking whether the gcc -std=gnu99 linker
>> (/usr/lib/gcc/.../ld) supports shared libraries
>> configure:9745: result: yes
>> ...
>> configure:11365: checking if libtool supports shared libraries
>> configure:11367: result: yes
>> configure:11370: checking whether to build shared libraries
>> configure:11391: result: yes
>> configure:11394: checking whether to build static libraries
>> configure:11398: result: yes
>>
>> I would guess one of these is failing for you, at which point you'd want to
>> figure out why that is.
> 
> None of the above is failing for me. I looked at the config.log file and tried the combination of different options none of them is working. In fact, I don't see a target for libbfd.so in the Makefile.  

Look for a libbfd.la target. There's libtool involved here, and I think
that's the rule where the .so linking happens (at the same time as
the creation of libbfd.a). IOW I suppose all depends on the flags
passed to libtool ...

> configure:11283: checking whether stripping libraries is possible
> configure:11288: result: yes
> configure:11323: checking if libtool supports shared libraries
> configure:11325: result: yes
> configure:11328: checking whether to build shared libraries
> configure:11349: result: yes
> configure:11352: checking whether to build static libraries
> configure:11356: result: yes
> configure:8563: checking for dlfcn.h
> configure:8563: result: yes
> 
> Just out of curiosity is the --enable-shared option really working for others?

Yes (on Linux; on Cygwin the answer would be "no").

Jan

>  Am I missing something during the compilation?
> 
> Regards,
> Rupesh P


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Need help buiding bfd shared library
  2022-08-04  6:46         ` Jan Beulich
@ 2022-08-04  9:45           ` Potharla, Rupesh
  2022-08-04  9:47             ` Jan Beulich
  0 siblings, 1 reply; 10+ messages in thread
From: Potharla, Rupesh @ 2022-08-04  9:45 UTC (permalink / raw)
  To: Jan Beulich
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

[AMD Official Use Only - General]



>-----Original Message-----
>From: Jan Beulich <jbeulich@suse.com>
>Sent: Thursday, August 4, 2022 12:17 PM
>To: Potharla, Rupesh <Rupesh.Potharla@amd.com>
>Cc: George, Jini Susan <JiniSusan.George@amd.com>; Parasuraman,
>Hariharan <Hariharan.Parasuraman@amd.com>; Kumar N, Bhuvanendra
><Bhuvanendra.KumarN@amd.com>; Potharla, Rupesh via Binutils
><binutils@sourceware.org>
>Subject: Re: Need help buiding bfd shared library
>
>[CAUTION: External Email]
>
>On 03.08.2022 20:59, Potharla, Rupesh wrote:
>> [Public]
>>
>>> On 03.08.2022 08:49, Potharla, Rupesh wrote:
>>>>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>>>>>> I am working on building bfd shared library for my code changes. I
>>>>>> tried with
>>>>> "configure --enable-shared=bfd" but BFD is creating static library
>>>>> only even with -enable-shared option .  Did I miss something ? Can
>>>>> someone help me with the instructions to build bfd shared library?
>>>>>
>>>>> Did you try --enable-shared without "=bfd"? So far I wasn't aware
>>>>> of that form as an option, and at least a quick inspection of the
>>>>> configure script also doesn't suggest that form might exist. But I
>>>>> may be
>>> entirely wrong ...
>>>>
>>>> I tried that option as well and tried with --enable-host-shared
>>>> combination
>>> also but no luck.
>>>
>>> You may want to inspect configure output then. Here in bfd/config.log
>>> I see
>>>
>>> configure:8674: checking whether the gcc -std=gnu99 linker
>>> (/usr/lib/gcc/.../ld) supports shared libraries
>>> configure:9745: result: yes
>>> ...
>>> configure:11365: checking if libtool supports shared libraries
>>> configure:11367: result: yes
>>> configure:11370: checking whether to build shared libraries
>>> configure:11391: result: yes
>>> configure:11394: checking whether to build static libraries
>>> configure:11398: result: yes
>>>
>>> I would guess one of these is failing for you, at which point you'd
>>> want to figure out why that is.
>>
>> None of the above is failing for me. I looked at the config.log file and tried
>the combination of different options none of them is working. In fact, I don't
>see a target for libbfd.so in the Makefile.
>
>Look for a libbfd.la target. There's libtool involved here, and I think that's the
>rule where the .so linking happens (at the same time as the creation of
>libbfd.a). IOW I suppose all depends on the flags passed to libtool ...
>
>> configure:11283: checking whether stripping libraries is possible
>> configure:11288: result: yes
>> configure:11323: checking if libtool supports shared libraries
>> configure:11325: result: yes
>> configure:11328: checking whether to build shared libraries
>> configure:11349: result: yes
>> configure:11352: checking whether to build static libraries
>> configure:11356: result: yes
>> configure:8563: checking for dlfcn.h
>> configure:8563: result: yes
>>
>> Just out of curiosity is the --enable-shared option really working for others?
>
>Yes (on Linux; on Cygwin the answer would be "no").

"./configure --enable-shared=bfd --enable-host-shared && make " is the command I am running for this. I ran it on multiple Linux machines but did not see libbfd.so.  
Can you confirm the command ?

Regards,
Rupesh P

 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-04  9:45           ` Potharla, Rupesh
@ 2022-08-04  9:47             ` Jan Beulich
  2022-08-04 10:01               ` Andreas Schwab
  2022-08-04 10:02               ` Errol Millios
  0 siblings, 2 replies; 10+ messages in thread
From: Jan Beulich @ 2022-08-04  9:47 UTC (permalink / raw)
  To: Potharla, Rupesh
  Cc: George, Jini Susan, Parasuraman, Hariharan, Kumar N, Bhuvanendra,
	Potharla, Rupesh via Binutils

On 04.08.2022 11:45, Potharla, Rupesh wrote:
>> From: Jan Beulich <jbeulich@suse.com>
>> Sent: Thursday, August 4, 2022 12:17 PM
>>
>> On 03.08.2022 20:59, Potharla, Rupesh wrote:
>>>> On 03.08.2022 08:49, Potharla, Rupesh wrote:
>>>>>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
>>>>>>> I am working on building bfd shared library for my code changes. I
>>>>>>> tried with
>>>>>> "configure --enable-shared=bfd" but BFD is creating static library
>>>>>> only even with -enable-shared option .  Did I miss something ? Can
>>>>>> someone help me with the instructions to build bfd shared library?
>>>>>>
>>>>>> Did you try --enable-shared without "=bfd"? So far I wasn't aware
>>>>>> of that form as an option, and at least a quick inspection of the
>>>>>> configure script also doesn't suggest that form might exist. But I
>>>>>> may be
>>>> entirely wrong ...
>>>>>
>>>>> I tried that option as well and tried with --enable-host-shared
>>>>> combination
>>>> also but no luck.
>>>>
>>>> You may want to inspect configure output then. Here in bfd/config.log
>>>> I see
>>>>
>>>> configure:8674: checking whether the gcc -std=gnu99 linker
>>>> (/usr/lib/gcc/.../ld) supports shared libraries
>>>> configure:9745: result: yes
>>>> ...
>>>> configure:11365: checking if libtool supports shared libraries
>>>> configure:11367: result: yes
>>>> configure:11370: checking whether to build shared libraries
>>>> configure:11391: result: yes
>>>> configure:11394: checking whether to build static libraries
>>>> configure:11398: result: yes
>>>>
>>>> I would guess one of these is failing for you, at which point you'd
>>>> want to figure out why that is.
>>>
>>> None of the above is failing for me. I looked at the config.log file and tried
>> the combination of different options none of them is working. In fact, I don't
>> see a target for libbfd.so in the Makefile.
>>
>> Look for a libbfd.la target. There's libtool involved here, and I think that's the
>> rule where the .so linking happens (at the same time as the creation of
>> libbfd.a). IOW I suppose all depends on the flags passed to libtool ...
>>
>>> configure:11283: checking whether stripping libraries is possible
>>> configure:11288: result: yes
>>> configure:11323: checking if libtool supports shared libraries
>>> configure:11325: result: yes
>>> configure:11328: checking whether to build shared libraries
>>> configure:11349: result: yes
>>> configure:11352: checking whether to build static libraries
>>> configure:11356: result: yes
>>> configure:8563: checking for dlfcn.h
>>> configure:8563: result: yes
>>>
>>> Just out of curiosity is the --enable-shared option really working for others?
>>
>> Yes (on Linux; on Cygwin the answer would be "no").
> 
> "./configure --enable-shared=bfd --enable-host-shared && make " is the command I am running for this. I ran it on multiple Linux machines but did not see libbfd.so.  
> Can you confirm the command ?

No, I cannot. As said previously, all I ever use is --enable-shared
(without any "=bfd").

Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-04  9:47             ` Jan Beulich
@ 2022-08-04 10:01               ` Andreas Schwab
  2022-08-04 10:02               ` Errol Millios
  1 sibling, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2022-08-04 10:01 UTC (permalink / raw)
  To: Jan Beulich via Binutils
  Cc: Potharla, Rupesh, Jan Beulich, George, Jini Susan, Parasuraman,
	Hariharan, Kumar N, Bhuvanendra

On Aug 04 2022, Jan Beulich via Binutils wrote:

> No, I cannot. As said previously, all I ever use is --enable-shared
> (without any "=bfd").

AC_DISABLE_SHARED supports `--enable-shared=PKGS', but there are some
places that use `test "$enable_shared" = yes' instead of `test
"$enable_shared" != no'.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Need help buiding bfd shared library
  2022-08-04  9:47             ` Jan Beulich
  2022-08-04 10:01               ` Andreas Schwab
@ 2022-08-04 10:02               ` Errol Millios
  1 sibling, 0 replies; 10+ messages in thread
From: Errol Millios @ 2022-08-04 10:02 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Potharla, Rupesh, George, Jini Susan, Parasuraman, Hariharan,
	Potharla, Rupesh via Binutils, Kumar N, Bhuvanendra

The version I am currently using is a bit old, but I built a version
of 2.36.1 last night with these exact commands on Debian 11:

> cd binutils-build
> ../binutils-gdb/configure --target=<arch> --prefix=<install-dir> --disable-nls -v --enable-shared
> make -j16 & make install

and after building I have

> find -name "libbfd.so"
./binutils-build/bfd/.libs/libbfd.so
./install/x86_64-pc-linux-gnu/tarn-elf32/lib/libbfd.so

The first time it failed building for some reason, but after I rm
-Rf'd the build directory and rebuilt everything, it worked fine.

On Thu, Aug 4, 2022 at 6:47 PM Jan Beulich via Binutils
<binutils@sourceware.org> wrote:
>
> On 04.08.2022 11:45, Potharla, Rupesh wrote:
> >> From: Jan Beulich <jbeulich@suse.com>
> >> Sent: Thursday, August 4, 2022 12:17 PM
> >>
> >> On 03.08.2022 20:59, Potharla, Rupesh wrote:
> >>>> On 03.08.2022 08:49, Potharla, Rupesh wrote:
> >>>>>> On 03.08.2022 08:09, Potharla, Rupesh via Binutils wrote:
> >>>>>>> I am working on building bfd shared library for my code changes. I
> >>>>>>> tried with
> >>>>>> "configure --enable-shared=bfd" but BFD is creating static library
> >>>>>> only even with -enable-shared option .  Did I miss something ? Can
> >>>>>> someone help me with the instructions to build bfd shared library?
> >>>>>>
> >>>>>> Did you try --enable-shared without "=bfd"? So far I wasn't aware
> >>>>>> of that form as an option, and at least a quick inspection of the
> >>>>>> configure script also doesn't suggest that form might exist. But I
> >>>>>> may be
> >>>> entirely wrong ...
> >>>>>
> >>>>> I tried that option as well and tried with --enable-host-shared
> >>>>> combination
> >>>> also but no luck.
> >>>>
> >>>> You may want to inspect configure output then. Here in bfd/config.log
> >>>> I see
> >>>>
> >>>> configure:8674: checking whether the gcc -std=gnu99 linker
> >>>> (/usr/lib/gcc/.../ld) supports shared libraries
> >>>> configure:9745: result: yes
> >>>> ...
> >>>> configure:11365: checking if libtool supports shared libraries
> >>>> configure:11367: result: yes
> >>>> configure:11370: checking whether to build shared libraries
> >>>> configure:11391: result: yes
> >>>> configure:11394: checking whether to build static libraries
> >>>> configure:11398: result: yes
> >>>>
> >>>> I would guess one of these is failing for you, at which point you'd
> >>>> want to figure out why that is.
> >>>
> >>> None of the above is failing for me. I looked at the config.log file and tried
> >> the combination of different options none of them is working. In fact, I don't
> >> see a target for libbfd.so in the Makefile.
> >>
> >> Look for a libbfd.la target. There's libtool involved here, and I think that's the
> >> rule where the .so linking happens (at the same time as the creation of
> >> libbfd.a). IOW I suppose all depends on the flags passed to libtool ...
> >>
> >>> configure:11283: checking whether stripping libraries is possible
> >>> configure:11288: result: yes
> >>> configure:11323: checking if libtool supports shared libraries
> >>> configure:11325: result: yes
> >>> configure:11328: checking whether to build shared libraries
> >>> configure:11349: result: yes
> >>> configure:11352: checking whether to build static libraries
> >>> configure:11356: result: yes
> >>> configure:8563: checking for dlfcn.h
> >>> configure:8563: result: yes
> >>>
> >>> Just out of curiosity is the --enable-shared option really working for others?
> >>
> >> Yes (on Linux; on Cygwin the answer would be "no").
> >
> > "./configure --enable-shared=bfd --enable-host-shared && make " is the command I am running for this. I ran it on multiple Linux machines but did not see libbfd.so.
> > Can you confirm the command ?
>
> No, I cannot. As said previously, all I ever use is --enable-shared
> (without any "=bfd").
>
> Jan

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-08-04 10:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03  6:09 Need help buiding bfd shared library Potharla, Rupesh
2022-08-03  6:43 ` Jan Beulich
2022-08-03  6:49   ` Potharla, Rupesh
2022-08-03  6:58     ` Jan Beulich
2022-08-03 18:59       ` Potharla, Rupesh
2022-08-04  6:46         ` Jan Beulich
2022-08-04  9:45           ` Potharla, Rupesh
2022-08-04  9:47             ` Jan Beulich
2022-08-04 10:01               ` Andreas Schwab
2022-08-04 10:02               ` Errol Millios

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).