WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to build -dev extensions?  (Read 4808 times)

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
How to build -dev extensions?
« on: February 09, 2016, 06:58:36 PM »
Hi,
Do you guys have any pointers on how to build -dev extensions? I'm working on building qemu64 (see my other thread), and it requires the -dev files for both spice-protocol and spice-server. I've built the non-dev extensions for both, but I don't know how to do the -dev ones.
I've read up on what files need to go into the -dev versions, but I'm not sure how to get them out of the install directory / properly into their own extension.
Thanks!

Rafael

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: How to build -dev extensions?
« Reply #1 on: February 09, 2016, 07:03:28 PM »
Hi flyingfishfinger
When you build an extension you have the files required for a  dev  extension. The  dev  extensions contain the
header files and static libraries (.h, .a, and .la files).

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #2 on: February 09, 2016, 07:57:17 PM »
What should one do if a source builds to a DESTDIR which then itself contains "home/tc/..."? Seems odd..

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: How to build -dev extensions?
« Reply #3 on: February 09, 2016, 08:15:20 PM »
Hi flyingfishfinger
I'm not sure I understand the question, but does this help:
http://wiki.tinycorelinux.net/wiki:creating_extensions#creating_a_tcz
Just adapt the instructions for /home/tc/

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #4 on: February 09, 2016, 08:17:52 PM »
No, I follow the instructions fine, that's not the issue.
I'm wondering whether it is ok for a piece of software to tie itself to the name of the current user's profile (in this case, "tc"). Shouldn't all the files be in /usr?

R

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: How to build -dev extensions?
« Reply #5 on: February 09, 2016, 08:33:14 PM »
Hi flyingfishfinger
Yes, most files should wind up under /usr. Some extensions will however place config files under  /home/$USER/.
The  /usr/local/tce.installed  script is used in that case to check for the existence of those files and create them
if they are not there.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: How to build -dev extensions?
« Reply #6 on: February 09, 2016, 09:08:26 PM »
Most apps will create the files/folders they need in home/$USER and /var if they are not present.

A few apps will fail to start if they files/folders they need are not present.

Maybe the best thing to do is to try the extension without the files/folders in /home/tc and see what happens - if the app fails to start, then you can add a suitable start-up script.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: How to build -dev extensions?
« Reply #7 on: February 09, 2016, 09:10:50 PM »
The  dev  extensions contain the header files and static libraries (.h, .a, and .la files).

..and .m4, .pc, .vapi, .deps, etc  :)
« Last Edit: February 09, 2016, 09:12:51 PM by Juanito »

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #8 on: February 09, 2016, 09:16:28 PM »
Alright, I got them built, but the calling program still says it can't find them. The headers are definitely in /usr/local/include/___/, and I"m assuming that's a standard include path. So how can I check where the caller is looking and why it can't find them? :(
(The caller is qemu's ./configure with the --spice option)

Quote
ERROR: User requested feature spice
       configure was not able to find it.
       Install spice-server(>=0.12.0) and spice-protocol(>=0.12.3) devel

The relevant section of configure is:
Quote
if test "$spice" != "no" ; then
  cat > $TMPC << EOF
#include <spice.h>
int main(void) { spice_server_new(); return 0; }
EOF
  spice_cflags=$($pkg_config --cflags spice-protocol spice-server 2>/dev/null)
  spice_libs=$($pkg_config --libs spice-protocol spice-server 2>/dev/null)
  if $pkg_config --atleast-version=0.12.0 spice-server && \
     $pkg_config --atleast-version=0.12.3 spice-protocol && \
     compile_prog "$spice_cflags" "$spice_libs" ; then
    spice="yes"
    libs_softmmu="$libs_softmmu $spice_libs"
    QEMU_CFLAGS="$QEMU_CFLAGS $spice_cflags"
    spice_protocol_version=$($pkg_config --modversion spice-protocol)
    spice_server_version=$($pkg_config --modversion spice-server)
  else
    if test "$spice" = "yes" ; then
      feature_not_found "spice" \
          "Install spice-server(>=0.12.0) and spice-protocol(>=0.12.3) devel"
    fi
    spice="no"
  fi
fi

R
« Last Edit: February 09, 2016, 09:23:11 PM by flyingfishfinger »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: How to build -dev extensions?
« Reply #9 on: February 09, 2016, 09:27:15 PM »
It's looking for the pkg-config files - /usr/local/lib/pkgconfig/*.pc - did you include these in your *-dev extension?

From the output below, the files would be named spice-server.pc and spice-protocol.pc

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #10 on: February 09, 2016, 09:41:20 PM »
Yes. Although it looks like spice-protocol.pc ended up in /usr/local/share/pkgconfig. I moved it to /lib/pkgconfig; they're both there now but I get the same error.

R

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: How to build -dev extensions?
« Reply #11 on: February 09, 2016, 09:57:40 PM »
The pkg-config extension will search both /usr/local/lib/pkgconfig and /usr/local/share/pkgconfig by default.

What do you get from this:
Code: [Select]
$ pkg-config --modversion /usr/local/lib/pkgconfig/spice-protocol.pc
$ pkg-config --modversion /usr/local/lib/pkgconfig/spice-server.pc

Edit: corrected commands above
« Last Edit: February 09, 2016, 10:17:31 PM by Juanito »

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #12 on: February 09, 2016, 10:19:06 PM »
Hm, their version numbering confuses me. According to the command, I have spice-protocol 0.12.11. According to their git, the latest tag is 0.12.10. I'll try checking out 0.12.9 instead and seeing what happens...

The server is fine at 0.13.0.something.

R

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: How to build -dev extensions?
« Reply #13 on: February 09, 2016, 10:31:56 PM »
If you look at config.log, it should show why the configure script doesn't like spice-protocol/spice-server

Offline flyingfishfinger

  • Jr. Member
  • **
  • Posts: 74
Re: How to build -dev extensions?
« Reply #14 on: February 09, 2016, 10:46:28 PM »
Quote
In file included from /usr/local/include/spice-server/spice.h:24:0,
                 from config-temp/qemu-conf.c:1:
/usr/local/include/spice-server/spice-core.h:27:27: fatal error: spice/qxl_dev.h: No such file or directory
 #include <spice/qxl_dev.h>
                           ^
compilation terminated.

That file exists in /usr/local/include/spice-protocol/spice/ though..

R