qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Statically Compiling including SDL
@ 2015-10-20  6:59 sai pavan
  2015-10-20  8:35 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: sai pavan @ 2015-10-20  6:59 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers, armbru, alistai,
	Peter Crosthwaite

Hi ,

I am trying to compile QEMU with --enable-sdl and --static. And i have
installed libsdl-dev.
I get the following error

ERROR: User requested feature sdl
       configure was not able to find it.
       Install SDL devel

Is there any know issue here ? or am i missing any more libraries.

FYI : Dynamic build is fine

Thanks,
Sai Pavan

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2015-10-20  6:59 [Qemu-devel] Statically Compiling including SDL sai pavan
@ 2015-10-20  8:35 ` Peter Maydell
  2015-10-20 17:50   ` sai pavan
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2015-10-20  8:35 UTC (permalink / raw)
  To: sai pavan
  Cc: Peter Crosthwaite, alistai, qemu-devel@nongnu.org Developers,
	Markus Armbruster

On 20 October 2015 at 07:59, sai pavan <saipavanboddu@gmail.com> wrote:
> Hi ,
>
> I am trying to compile QEMU with --enable-sdl and --static. And i have
> installed libsdl-dev.
> I get the following error
>
> ERROR: User requested feature sdl
>        configure was not able to find it.
>        Install SDL devel
>
> Is there any know issue here ? or am i missing any more libraries.

This probably means you haven't installed the static library
version of libsdl, or possibly that your distro's static libsdl
packaging is broken. You can look at config.log to see what
test program command line configure was trying that didn't work.
You can also look in the configure script itself to see what
our libsdl test is checking for.

thanks
-- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2015-10-20  8:35 ` Peter Maydell
@ 2015-10-20 17:50   ` sai pavan
  2015-10-20 18:22     ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: sai pavan @ 2015-10-20 17:50 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Peter Crosthwaite, alistai, qemu-devel@nongnu.org Developers,
	Markus Armbruster

Hi Peter,

On Tue, Oct 20, 2015 at 2:05 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 20 October 2015 at 07:59, sai pavan <saipavanboddu@gmail.com> wrote:
>> Hi ,
>>
>> I am trying to compile QEMU with --enable-sdl and --static. And i have
>> installed libsdl-dev.
>> I get the following error
>>
>> ERROR: User requested feature sdl
>>        configure was not able to find it.
>>        Install SDL devel
>>
>> Is there any know issue here ? or am i missing any more libraries.
>
> This probably means you haven't installed the static library
> version of libsdl, or possibly that your distro's static libsdl
> packaging is broken. You can look at config.log to see what
> test program command line configure was trying that didn't work.
> You can also look in the configure script itself to see what
> our libsdl test is checking for.

I also tried manually compiling sdl libraries and installing them.
Then making a static build, but even that did not help much. The
config.log show below error..

cc -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
-Wmissing-prototypes -fno-strict-aliasing -fno-common
-DM25P80_ERR_DEBUG=2 -Wendif-labels -Wmissing-include-dirs
-Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k
-Winit-self -Wignored-qualifiers -Wold-style-declaration
-Wold-style-definition -Wtype-limits -fstack-protector-strong
-D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -o
config-temp/qemu-conf.exe config-temp/qemu-conf.c -m32 -static -g
/tmp/ccYwbqPp.o: In function `main':
/home/sai/build/config-temp/qemu-conf.c:3: undefined reference to `SDL_Init'
collect2: error: ld returned 1 exit status

Regards,
Sai Pavan
                       ^

>
> thanks
> -- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2015-10-20 17:50   ` sai pavan
@ 2015-10-20 18:22     ` Peter Maydell
  2015-10-21 10:04       ` sai pavan
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2015-10-20 18:22 UTC (permalink / raw)
  To: sai pavan
  Cc: Peter Crosthwaite, alistai, qemu-devel@nongnu.org Developers,
	Markus Armbruster

On 20 October 2015 at 18:50, sai pavan <saipavanboddu@gmail.com> wrote:
> I also tried manually compiling sdl libraries and installing them.
> Then making a static build, but even that did not help much. The
> config.log show below error..
>
> cc -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
> -Wmissing-prototypes -fno-strict-aliasing -fno-common
> -DM25P80_ERR_DEBUG=2 -Wendif-labels -Wmissing-include-dirs
> -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k
> -Winit-self -Wignored-qualifiers -Wold-style-declaration
> -Wold-style-definition -Wtype-limits -fstack-protector-strong
> -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -o
> config-temp/qemu-conf.exe config-temp/qemu-conf.c -m32 -static -g
> /tmp/ccYwbqPp.o: In function `main':
> /home/sai/build/config-temp/qemu-conf.c:3: undefined reference to `SDL_Init'
> collect2: error: ld returned 1 exit status

This link line isn't even trying to link against the SDL library,
which suggests that your sdl-config is broken. What does
'sdl-config --static-libs' say?

thanks
-- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2015-10-20 18:22     ` Peter Maydell
@ 2015-10-21 10:04       ` sai pavan
  2015-10-21 12:18         ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: sai pavan @ 2015-10-21 10:04 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Peter Crosthwaite, alistai, qemu-devel@nongnu.org Developers,
	Markus Armbruster

On Tue, Oct 20, 2015 at 11:52 PM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 20 October 2015 at 18:50, sai pavan <saipavanboddu@gmail.com> wrote:
>> I also tried manually compiling sdl libraries and installing them.
>> Then making a static build, but even that did not help much. The
>> config.log show below error..
>>
>> cc -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
>> -Wmissing-prototypes -fno-strict-aliasing -fno-common
>> -DM25P80_ERR_DEBUG=2 -Wendif-labels -Wmissing-include-dirs
>> -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k
>> -Winit-self -Wignored-qualifiers -Wold-style-declaration
>> -Wold-style-definition -Wtype-limits -fstack-protector-strong
>> -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -o
>> config-temp/qemu-conf.exe config-temp/qemu-conf.c -m32 -static -g
>> /tmp/ccYwbqPp.o: In function `main':
>> /home/sai/build/config-temp/qemu-conf.c:3: undefined reference to `SDL_Init'
>> collect2: error: ld returned 1 exit status
>
> This link line isn't even trying to link against the SDL library,
> which suggests that your sdl-config is broken. What does
> 'sdl-config --static-libs' say?
here is the output of sdl-config --static-libs

-L/usr/lib/i386-linux-gnu -lSDL -lpthread -lm -ldl -lasound -lm -ldl
-lpthread -lpulse-simple -lpulse -lX11 -lXext
-L/usr/lib/i386-linux-gnu -lcaca -lpthread

Regards,
Sai Pavan
>
> thanks
> -- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2015-10-21 10:04       ` sai pavan
@ 2015-10-21 12:18         ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2015-10-21 12:18 UTC (permalink / raw)
  To: sai pavan
  Cc: Peter Crosthwaite, alistai, qemu-devel@nongnu.org Developers,
	Markus Armbruster

On 21 October 2015 at 11:04, sai pavan <saipavanboddu@gmail.com> wrote:
> On Tue, Oct 20, 2015 at 11:52 PM, Peter Maydell
> <peter.maydell@linaro.org> wrote:
>> On 20 October 2015 at 18:50, sai pavan <saipavanboddu@gmail.com> wrote:
>>> I also tried manually compiling sdl libraries and installing them.
>>> Then making a static build, but even that did not help much. The
>>> config.log show below error..
>>>
>>> cc -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
>>> -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
>>> -Wmissing-prototypes -fno-strict-aliasing -fno-common
>>> -DM25P80_ERR_DEBUG=2 -Wendif-labels -Wmissing-include-dirs
>>> -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k
>>> -Winit-self -Wignored-qualifiers -Wold-style-declaration
>>> -Wold-style-definition -Wtype-limits -fstack-protector-strong
>>> -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -o
>>> config-temp/qemu-conf.exe config-temp/qemu-conf.c -m32 -static -g
>>> /tmp/ccYwbqPp.o: In function `main':
>>> /home/sai/build/config-temp/qemu-conf.c:3: undefined reference to `SDL_Init'
>>> collect2: error: ld returned 1 exit status
>>
>> This link line isn't even trying to link against the SDL library,
>> which suggests that your sdl-config is broken. What does
>> 'sdl-config --static-libs' say?
> here is the output of sdl-config --static-libs
>
> -L/usr/lib/i386-linux-gnu -lSDL -lpthread -lm -ldl -lasound -lm -ldl
> -lpthread -lpulse-simple -lpulse -lX11 -lXext
> -L/usr/lib/i386-linux-gnu -lcaca -lpthread

And is there a static version (a .a file) for all those
libraries in /usr/lib/i386-linux-gnu/ ?

If sdl-config is printing those libraries, I'm confused about
why they're not in the command line we're using for the config
tests. You may have to start debugging configure by adding
suitable 'echo' debug printing in it :-(

thanks
-- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
@ 2016-05-11 18:12 Sam McKelvie
  2016-05-11 18:30 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Sam McKelvie @ 2016-05-11 18:12 UTC (permalink / raw)
  To: peter.maydell; +Cc: qemu-devel

I am having this same problem. Looking at the configure script it looks like it prefers to use:

   pkg-config sdl —static

to get the static linker flags, rather than:

  sdl-config —static-libs

The former returns an empty string; the latter returns the correct library list. If it had used the latter it would work properly. There is
a note in the configure effect suggesting that pig-config is preferred, but I’m not sure why that is…



  

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2016-05-11 18:12 Sam McKelvie
@ 2016-05-11 18:30 ` Peter Maydell
  2016-05-11 20:39   ` Sam McKelvie
  0 siblings, 1 reply; 10+ messages in thread
From: Peter Maydell @ 2016-05-11 18:30 UTC (permalink / raw)
  To: Sam McKelvie; +Cc: QEMU Developers

On 11 May 2016 at 19:12, Sam McKelvie <sammck@gmail.com> wrote:
> I am having this same problem. Looking at the configure script
> it looks like it prefers to use:
>
>    pkg-config sdl —static
>
> to get the static linker flags, rather than:
>
>   sdl-config —static-libs

Are you trying to statically compile to get a linux-user
binary, or a system-emulation binary? For the former we
shouldn't be linking in SDL anyway, and statically compiling
the latter isn't really supported in my view. (Maybe we
should make configure explicitly reject it. It has a tendency
to break because distros don't check the static-compilation
version of their pkg-config configuration files.)

> The former returns an empty string; the latter returns the correct
> library list. If it had used the latter it would work properly.
> There is a note in the configure effect suggesting that pig-config
> is preferred, but I’m not sure why that is…

pkg-config plays better with cross compilation: you have one
your-architecture-pkg-config which knows about the config files
for that architecture for all libraries. Having a different
config script for each library makes it a huge pain to try
to swap in the right one for each architecture.

(If the two give different answers this is a distro bug.)

thanks
-- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2016-05-11 18:30 ` Peter Maydell
@ 2016-05-11 20:39   ` Sam McKelvie
  2016-05-11 22:42     ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: Sam McKelvie @ 2016-05-11 20:39 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

Apologies for breaking the thread of the discussion; still
haven’t figured out how to cold-respond to a thread without an incoming email.

Thank you for your response. Indeed, for my purposes I only need the
static linux-user binary, so I can just remove SDL and it’s not a problem.

I’d agree that it is an SDL package distribution problem; in this case it is coming
from delian-jessie.

Thank you,
Sam McKelvie

> On May 11, 2016, at 11:30 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> 
> On 11 May 2016 at 19:12, Sam McKelvie <sammck@gmail.com> wrote:
>> I am having this same problem. Looking at the configure script
>> it looks like it prefers to use:
>> 
>>   pkg-config sdl —static
>> 
>> to get the static linker flags, rather than:
>> 
>>  sdl-config —static-libs
> 
> Are you trying to statically compile to get a linux-user
> binary, or a system-emulation binary? For the former we
> shouldn't be linking in SDL anyway, and statically compiling
> the latter isn't really supported in my view. (Maybe we
> should make configure explicitly reject it. It has a tendency
> to break because distros don't check the static-compilation
> version of their pkg-config configuration files.)
> 
>> The former returns an empty string; the latter returns the correct
>> library list. If it had used the latter it would work properly.
>> There is a note in the configure effect suggesting that pig-config
>> is preferred, but I’m not sure why that is…
> 
> pkg-config plays better with cross compilation: you have one
> your-architecture-pkg-config which knows about the config files
> for that architecture for all libraries. Having a different
> config script for each library makes it a huge pain to try
> to swap in the right one for each architecture.
> 
> (If the two give different answers this is a distro bug.)
> 
> thanks
> -- PMM

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

* Re: [Qemu-devel] Statically Compiling including SDL
  2016-05-11 20:39   ` Sam McKelvie
@ 2016-05-11 22:42     ` Peter Maydell
  0 siblings, 0 replies; 10+ messages in thread
From: Peter Maydell @ 2016-05-11 22:42 UTC (permalink / raw)
  To: Sam McKelvie; +Cc: QEMU Developers

On 11 May 2016 at 21:39, Sam McKelvie <sammck@gmail.com> wrote:
> Apologies for breaking the thread of the discussion; still
> haven’t figured out how to cold-respond to a thread without an incoming email.
>
> Thank you for your response. Indeed, for my purposes I only need the
> static linux-user binary, so I can just remove SDL and it’s not a problem.

You can use the --target-list=... options to configure to tell it
to only build the linux-user binaries you care about, or use
--disable-system --disable-tools to disable building of the
system-emulation binaries and the miscellaneous standalone tools.
I recommend one or the other if you're using --static
(and then you should not need to uninstall SDL to build).

thanks
-- PMM

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

end of thread, other threads:[~2016-05-11 22:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20  6:59 [Qemu-devel] Statically Compiling including SDL sai pavan
2015-10-20  8:35 ` Peter Maydell
2015-10-20 17:50   ` sai pavan
2015-10-20 18:22     ` Peter Maydell
2015-10-21 10:04       ` sai pavan
2015-10-21 12:18         ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2016-05-11 18:12 Sam McKelvie
2016-05-11 18:30 ` Peter Maydell
2016-05-11 20:39   ` Sam McKelvie
2016-05-11 22:42     ` Peter Maydell

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 NNTP newsgroup(s).