SliTaz SliTaz Forum

You are not logged in.

#1 2012-12-26 21:03:09

devl547
Administrator
Registered: 2011-06-01
Posts: 285

[4 all developers] Cooking & headers

Someone, please fix the cooking version.

I cannot build any more or less big package (now trying to update Firefox to v17).

Keep getting messages about missing header files like this:

../../../dist/system_wrappers/glib.h:3:23: fatal error: glib.h: No such file or directory

Software is looking for them in /usr/include/ , but actually exist in /usr/include/$pkgname/ (/usr/include/glib-2.0/glib.h for example).

Any ideas?

Offline

#2 2012-12-26 23:23:58

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Hi devl547,

First of all, it's problem NOT with dev-packages containing headers.

There are many placements of headers in various packages:

/usr/include/glib-2.0

/usr/lib/glib-2.0/include

...

How to deal with this? Here is *.pc files: http://pkgs.slitaz.org/search.sh?file=/usr/lib/pkgconfig/

RTFM pkg-config. Instead of "man pkg-config" I can say you only "pkg-config --help".

See hint in my receipt here (line 3.22).

I've got many and many errors like you: "... ... .h: No such file or directory"

Add pkg-config to build-depends.

Add line in compile_rules() before ./configure:

[c]CFLAGS="$CFLAGS $(pkg-config --cflags space_separated_list_of_packages)"[/c]
It's not names of dev-packages, actually it's names of "/usr/lib/pkgconfig/***.pc" files.

Here example:

Package glib-dev in Cooking contains files:

[c]/usr/lib/pkgconfig/glib-2.0.pc
/usr/lib/pkgconfig/gmodule-2.0.pc
/usr/lib/pkgconfig/gmodule-export-2.0.pc
/usr/lib/pkgconfig/gmodule-no-export-2.0.pc
/usr/lib/pkgconfig/gobject-2.0.pc
/usr/lib/pkgconfig/gthread-2.0.pc[/c]
If I need gobject as depend, I can write:

[c]CFLAGS="$CFLAGS $(pkg-config --cflags gobject-2.0)"[/c]
Or, in other words:

[c]# pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 

# pkg-config --cflags gobject-2.0
-pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include 

# pkg-config --cflags gtksourceview-2.0
-pthread -I/usr/include/gtksourceview-2.0 -I/usr/include/libxml2 -I/usr/include/
gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -
I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I
/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/us
r/include/libpng12[/c]
Mix together cflags for two packages:

[c]# pkg-config --cflags gtksourceview-2.0 glib-2.0
-pthread -I/usr/include/gtksourceview-2.0 -I/usr/include/libxml2 -I/usr/include/
gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -
I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I
/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/us
r/include/libpng12[/c]

Offline

#3 2012-12-27 07:00:29

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

>First of all, it's problem NOT with dev-packages containing headers.

It's a problem with cooker. It needs to add include dirs by inself.

> I can write: CFLAGS="$CFLAGS $(pkg-config --cflags gobject-2.0)"

We already have BUILD_DEPENDS. Why do we need to write additional code in receipts?

Also, I have never seen this problem in good old Slitaz 2.0/3.0 times.

Offline

#4 2012-12-27 11:00:05

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Nope. It's NOT problem with cooker. It's really problem with source codes.

Ol' good days?? Yes, the programmers have moved away from the business. Students came. Broke the codes. ☺

Please, see history of firefox's receipt: http://hg.slitaz.org/wok/log/804f06c0e28f/firefox/receipt

Where you see just "./configure && make && make install"??

For example, your last firefox commit (for ver. 8.0): http://hg.slitaz.org/wok/file/3d98b947aef3/firefox/receipt

112 lines of code ☺

Latest receipt: http://hg.slitaz.org/wok/file/6aa501a7751e/firefox/receipt

Two patches and two seds before ./configure.

Really, I think it would be nice if you told the Firefox authors about their garbage code.

> Dear all, your configure script not see my headers.

> How to repeat? Download & unzip tarball; install {list of dev pkgs}; run ./configure && make.

Alexander, I did not want to hurt you. And I do not want to engage in polemics. I showed a simple solution as not changing the ./configure script itself force to make it work. If you want to teach cooker magic, I'll be very happy ☺ Then all the recipes will be very simple.

By the way, show me Gentoo "receipt" for firefox (sorry, it is called "ebuild"?) Maybe we will find some interesting solutions?

Offline

#5 2012-12-27 11:30:20

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

I think, here it is: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/www-client/firefox/firefox-10.0.11.ebuild?hideattic=0&revision=1.6&view=markup

Latest ebuild (25 hours ago) for firefox (ver. 10.0.11).

I'm not Gentoo user, even not try it never. I know only that this is the great way to compile sources to fit own system.

No. This ebuild not the solution for SliTaz receipt…

Search for LFS (Linux From Scratch) "receipt"? Probably not.

Anyway, last Firefoxes is too slow for my machine and I use them (in my daily surfing) about a year ago.

Old good Fx3.6! ☺ Without 3D source viewer, without WebGL and many many stuff that I not need anytime… I am sorry only that there is no equivalent for Scratchbook in Midori.

Offline

#6 2012-12-27 11:40:02

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: [4 all developers] Cooking & headers

*coff* http://www.trixarian.net/SliTaz *coff*

Maybe just make a receipt that packs the upgradable and stand-alone version provided by Mozilla. Then it's just a simple act of upgrading to get the latest working version.

Offline

#7 2012-12-27 11:50:05

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Hi Trixar,

Yes, I think we can handle both firefox and get-firefox packages on wok. Do you want to work under get-firefox receipt?

Offline

#8 2012-12-27 12:09:27

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: [4 all developers] Cooking & headers

A get-firefox package would be a little difficult to create since it requires the modification of the /usr/bin/firefox script to point to the right directory (probably in /usr/lib/firefox), placement of the icons and the creation of the shortcut for the menu. Once those are done the rest would be easy. You can either have a package that fetches the source off the internet or have a package created from it by just placing the files in the right place. Cooker should be able to deal with both.

Offline

#9 2012-12-27 12:51:51

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

>Alexander, I did not want to hurt you.

T____T Jist kidding)

nvm, I have already built ff17 manually, looks like we just need to add some more tweaks to the receipt.

> If you want to teach cooker magic

If you are right and fixing headers needs just "CFLAGS="$CFLAGS $(pkg-config --cflags pkgname-x.y)", then it's simple.

P.S. Guys, I know that using cooking is my main fault. But we need to clean it up sooner or later.

Offline

#10 2012-12-27 14:43:11

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: [4 all developers] Cooking & headers

True, we all need to deal with cooking's issues if we hope to release SliTaz 5 on time next year. I'll only be able to deal with issues I can see myself, much like how I fixed ppp after forcing myself to use RC1.

Offline

#11 2012-12-27 19:08:16

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

Trixar_za, I want to fix some issues and do some serious version bumps.

But I need two things:

1. Stable cooker (no matter where the header problem is located)

2. Some time (And I have it)

Offline

#12 2012-12-28 01:33:35

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

>Alexander, I did not want to hurt you.

T____T Jist kidding)

wink Google Translator was here. I've used it to create some phrases. All these English verb times, past perfect and past indefinite...

The best cooker, as I see it, should ask you only source URL neutral

We can use large Debian base for filling ShortDesc and WebSite. Analizing URL it's no hard to determine Tarball and method of source fetching (SF mirror, git, Hg, etc).

I can't say any automotion about compile rules, but at least, it's not hard to show configure optional keys.

Building package rules most simple. Copy all but dev files, man & info, locale files. If dev files exists, then create dev-package. Man- and locale-package at your taste.

Now stripping, and auto depend list. I've created script to fill Depends in receipt. But it works only with regular (C/C++) apps. I can't deal with Python depends.

We have simple and not so useful interactive mode in cook. I think we can write many improvements to it, to help us write receipts.

On the other side, I think about non-interactive regular job. One of it -- binary files stripping (now implemented). I have a concept of Non Interactive Cook Enhancer (NICE). Have no time to write it, here only one configuration shell script in attachment... But, I think you'll get the idea!

Offline

#13 2012-12-28 07:44:41

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

>The best cooker, as I see it, should ask you only source URL neutral

It's dangerous to do this. Take my Occam's Razor!

Offline

#14 2012-12-28 11:01:00

Guest
Guest

Re: [4 all developers] Cooking & headers

devl547,  are you reptile from MK ?

#15 2012-12-28 19:25:39

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

>are you reptile from MK ?

I prefer Raiden from MK1 (before Kung Lao stole his hat in MK2). I also work with high voltage.

Offline

#16 2012-12-29 22:40:21

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: [4 all developers] Cooking & headers

Er, devl547, how do I even boot SliTaz Rolling? Seems like a pretty big mess if we can't even boot it hmm

Offline

#17 2012-12-30 00:23:09

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Hi, Trixar! You can't boot Rolling? Strange... Not all smooth, but it loads (not loaded some kernel modules and video drivers until HAL transition, works with VESA video).

We started this topic with Firefox.

fatfox.png

Alexander, can you apply to receipt stuff some settings described here? Maybe, I'll use Firefox again... hmm

Offline

#18 2012-12-30 00:49:18

Trixar_za
Administrator
Registered: 2011-03-29
Posts: 1,506

Re: [4 all developers] Cooking & headers

Oh I can boot some of it. Tux is broken again, but root logs in. I admit I'm not impressed with rolling. It's worse than slitaz 4's cooking which made me rage quit for a month. We need to do better. SliTaz deserves that much. But it feels like the left hand has no idea what the right hand is doing...

Offline

#19 2012-12-30 02:12:23

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Trixar, I agree with you. Rolling, in it's current state, is just unusable. Have you ideas, or, better, clear list, what is broken, what to fix?

It's not my strong side. I don't know, seems like system already contains all drivers I need, but not loads them. Why? Maybe, not scanned for devices? Have, but not load intel video, etc. Which it's job? HAL/UDev? (as for me, it's only names of strange creatures hmm )

Or it's job of kernel? Or XOrg? Sorry, I'm only deletant, and see no way.

I can't switch to Rolling. I write new receipts in my Stable, satisfy depends for package will builds. Then push receipt to cooking wok. And it is 90% possibility that receipt will builds in cooking (there are electricsheep and nanoshot packages that builds in stable and fails in cooking). But I can't debug building process in cooking/rolling. It's strange game, but it is.

And, you say that tux user is broken? I successfully started X as tux, about two weeks ago. From console log in as root, command 'slim' (I know that slim should auto start, and with system permissions), then user tux and no password. And, new Pcmanfm can't handle desktop, or what? No icons nor wallpaper...

Offline

#20 2012-12-30 08:08:00

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

>can you apply to receipt stuff some settings described here? Maybe, I'll use Firefox again... hmm

oki. I've tested em - FF uses about 70Mb idle with no webpages open and no extensions.

Still way too much.

Offline

#21 2012-12-30 12:31:42

kultex
Administrator
Registered: 2011-03-28
Posts: 1,175

Re: [4 all developers] Cooking & headers

@Aleksej and Trixar

very nice, that you start dealing with cooking

is it possible to move there

http://forum.slitaz.org/topic/notes-to-new-cooking#post-19653

I will start to edit tonight the first post, with all the rest I know in the meantime

Thomas

Offline

#22 2012-12-30 13:52:30

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

Ok, Thomas.

I'll try rolling again in meantime and will post a couple of lines there.

If I understand correctly, our main butthurt is with hal/udev. So, firstly, we need to change set of packages - flavor(s), and then try again (and again). Ok, I stop twitting and let's move on...

Offline

#23 2013-01-25 23:54:40

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: [4 all developers] Cooking & headers

[4 all developers] Cooking & headers

http://fedoraproject.org/wiki/UnderstandingDSOLinkChange

Offline

#24 2013-01-29 16:29:57

devl547
Administrator
Registered: 2011-06-01
Posts: 285

Re: [4 all developers] Cooking & headers

Some more non-agressive size optimizations:

CFLAGS: -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fvisibility=hidden -fvisibility-inlines-hidden

LDFLAGS: -Wl,--strip-all -Wl,--gc-sections

// Also, I had to remove this commit on my system as cooker became broken after it: http://hg.slitaz.org/cookutils/rev/21033ee28b15

Offline

#25 2013-01-30 13:09:06

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: [4 all developers] Cooking & headers

i reverted back this change too

http://hg.slitaz.org/cookutils/rev/ab53ffd16827

i started using cooker to have pretty logs in web interface ...

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]