Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258396 - Package request: sys-devel/crosstools-ng
Summary: Package request: sys-devel/crosstools-ng
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://ymorin.is-a-geek.org/dokuwiki/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-10 01:48 UTC by r01
Modified: 2010-07-15 17:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for crosstool-ng (crosstool-ng-1.5.3.ebuild,780 bytes, text/plain)
2010-01-15 12:31 UTC, Anthony Basile
Details
patch to fix configure to work with econf (crosstool-ng-fix-configure.patch,546 bytes, patch)
2010-01-15 12:34 UTC, Anthony Basile
Details | Diff
Should not have had unpack ${A} in src_prepare() (crosstool-ng-fix-configure.patch,546 bytes, text/plain)
2010-01-15 14:03 UTC, Anthony Basile
Details
Should not have had unpack ${A} in src_prepare() (crosstool-ng-1.5.3.ebuild,779 bytes, text/plain)
2010-01-15 14:04 UTC, Anthony Basile
Details
patch to fix configure to work with econf (crosstool-ng-fix-configure.patch,705 bytes, patch)
2010-01-16 14:43 UTC, Anthony Basile
Details | Diff
ebuild for release crosstool-ng-1.6.0 (crosstool-ng-1.6.0.ebuild,634 bytes, text/plain)
2010-02-07 21:01 UTC, Anthony Basile
Details
Addresses Comment #12 (ct-ng-1.6.1.ebuild,650 bytes, text/plain)
2010-03-16 15:59 UTC, Anthony Basile
Details
failed emerge of ct-ng-1.6.1 (ct-ng.build.log,6.90 KB, text/plain)
2010-03-18 15:04 UTC, Jan
Details
Version bump for 1.6.2 (ct-ng-1.6.2.ebuild,635 bytes, text/plain)
2010-05-31 11:29 UTC, Anthony Basile
Details
Version bump to 1.7.0 (ct-ng-1.7.0.ebuild,635 bytes, text/plain)
2010-05-31 11:29 UTC, Anthony Basile
Details
Saner approach to non-standard build system (ct-ng-1.7.0-r1.ebuild,714 bytes, text/plain)
2010-06-07 01:54 UTC, Anthony Basile
Details
Patch used by ct-ng-1.7.0-r1.ebuild (fix-man-path.patch,538 bytes, patch)
2010-06-07 01:56 UTC, Anthony Basile
Details | Diff
ebuild for the latest stable release (ct-ng-1.7.1.ebuild,713 bytes, text/plain)
2010-07-11 18:27 UTC, Anthony Basile
Details
Patch to fix the man page path (fix-man-path.patch,538 bytes, patch)
2010-07-11 18:28 UTC, Anthony Basile
Details | Diff
Package metadata (metadata.xml,591 bytes, text/plain)
2010-07-11 18:30 UTC, Anthony Basile
Details
Patch to fix the man page path (ct-ng.mandir.patch,1.45 KB, patch)
2010-07-15 17:31 UTC, Yann E. MORIN
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description r01 2009-02-10 01:48:12 UTC
crosstool-NG aims at building toolchains. Toolchains are an essential component in a software development project. It will compile, assemble and link the code that is being developed. Some pieces of the toolchain will eventually end up in the resulting binary/ies: static libraries are but an example.
Comment 1 Anthony Basile gentoo-dev 2010-01-15 12:31:13 UTC
I would also like to see crosstool-ng in portage.  I've attached an ebuild and a patch.  I'm going to try to get upstream to accept a more portable configure.ac rather than his current build method.
Comment 2 Anthony Basile gentoo-dev 2010-01-15 12:31:58 UTC
Created attachment 216589 [details]
ebuild for crosstool-ng
Comment 3 Anthony Basile gentoo-dev 2010-01-15 12:34:29 UTC
Created attachment 216591 [details, diff]
patch to fix configure to work with econf

The current configure file does not accept a lot of the options passed by econf, like --build= and --host=.  This patch is a hack to make configure silently ignore those options.
Comment 4 Anthony Basile gentoo-dev 2010-01-15 14:03:13 UTC
Created attachment 216598 [details]
Should not have had unpack ${A} in src_prepare()

The obsoleted version of ebuild should not have had the unpack and failed.  This one works, but the man page is being installed to the wrong location.  I will work on it.
Comment 5 Anthony Basile gentoo-dev 2010-01-15 14:04:39 UTC
Created attachment 216599 [details]
Should not have had unpack ${A} in src_prepare()

Damn, uploaded the patch instead of the ebuild.
Comment 6 Anthony Basile gentoo-dev 2010-01-16 14:43:35 UTC
Created attachment 216682 [details, diff]
patch to fix configure to work with econf 

After discussion upstream, this is a better way of making configure compatible with gnu auto-stuff and econf.
Comment 7 SpanKY gentoo-dev 2010-01-17 00:50:50 UTC
doing `cd $S` in any function other than src_unpack is redundant -- drop it

i dont think you use the savedconfig eclass ?

your src_configure and src_compile functions are redundant -- delete them

does the build system not like trailing slashes on $D ?  seems like a bug in the Makefile that should be fixed

ignoring that, you shouldnt create local variables without declaring them local:
local MY_D=...

if you only want to delete a trailing char, using `sed` is overkill.  you can do the same thing with:
emake DESTDIR="${D%/}" ...

i'd tweak the description:
"cross-compiling"
"toolchains"
Comment 8 Anthony Basile gentoo-dev 2010-01-17 19:54:03 UTC
The patch has been accepted upstream.  I will drop the patch and rewrite the ebuild with your suggestions once the patch hits their tree.

BTW1, I am aware of where the issue is in the Makefile.  Its trying to determine if a path is absolute or not.  It correctly gets /path/to/somewhere as absolute but incorrectly thinks /path/to/somewhere/ is not.  I'll try to debug that and get it upstream too.

BTW2, you do not need the savedconfig.  I had it there because crosstool-ng uses a make menuconfig, but that's when the user builds the x-tools with it, not when crosstool-ng is itself built.  I meant to remove it.
Comment 9 Anthony Basile gentoo-dev 2010-02-07 21:01:32 UTC
Created attachment 218869 [details]
ebuild for release crosstool-ng-1.6.0

The patch to fix configure to work with econf was accepted upstream.  Release 1.6.0 plays nicely with portage now.
Comment 10 SpanKY gentoo-dev 2010-02-11 04:41:59 UTC
the --mandir option is screwy.  it's supposed to set the base mandir, not a section-specific mandir.  so it should be --mandir=/usr/share/man and it's up to the package to tack on .../man1/ or .../man8/ or ...

the package doesnt need eutils eclass anymore, and the EAPI isnt necessary
Comment 11 Anthony Basile gentoo-dev 2010-02-18 16:24:07 UTC
It is a screwy workaround.  Without it, the package installs the man page to /usr/share/man/ct-ng.1.gz.  The problem with their build system is that the configure file was written by hand and so breaks with autotool conventions at places.  The previous patch addressed part of the problem.  The mandir issue is still there.

In retrospect, a better approach would be to patch the configure file again and get it to install in man1.  I'll pursue this approach and talk to upstream.
Comment 12 Bruno 'brubru' Tarquini 2010-02-25 11:00:23 UTC
docs are installed in two places:

by make install:

    /usr/share/doc/ct-ng-1.6.0/CREDITS
    /usr/share/doc/ct-ng-1.6.0/overview.txt

by dodoc:

    /usr/share/doc/crosstool-ng-1.6.0/CREDITS
    /usr/share/doc/crosstool-ng-1.6.0/README
    /usr/share/doc/crosstool-ng-1.6.0/TODO
    /usr/share/doc/crosstool-ng-1.6.0/known-issues.txt
    /usr/share/doc/crosstool-ng-1.6.0/overview.txt

I tried to pass --docdir=/usr/share/doc/$P to econf but this gave me docs under /usr/share/doc/crosstool-ng-1.6.0/ct-ng-1.6.0/ instead of /usr/share/doc/crosstool-ng-1.6.0/

This issue comes from package naming: even if the package name is crosstool-ng (project, tarball...), everything into the package is referred as ct-ng:

    /usr/bin/ct-ng
    /usr/lib/ct-ng-1.6.0/
    /usr/share/doc/ct-ng-1.6.0/
Comment 13 Anthony Basile gentoo-dev 2010-03-16 15:57:01 UTC
I'm addressing the above issues with crosstools-ng-1.6.1 which was just released:

Re Comment #12: I agree that renaming is the better approach.  The next ebuild will be named ct-ng-1.6.1.ebuild.  This solves the doc problem and keeps everything consistently named .../ct-ng on the filesystem.

Re Comments #10 + #11: I'm still not sure how to fix this in an elegant fashion.  The configure script (which is handwritten) does its job in a consistent way, but it is different from how gnu autotools work.  I can patch it, but this approach makes it harder to maintain between releases.  I'm not sure what I can get accepted/fixed in this regard upstream.
Comment 14 Anthony Basile gentoo-dev 2010-03-16 15:59:55 UTC
Created attachment 223903 [details]
Addresses Comment #12
Comment 15 Jan 2010-03-18 15:04:02 UTC
Created attachment 224131 [details]
failed emerge of ct-ng-1.6.1

Emerging ct-ng-1.6.1 fails for me. See attached build.log.
Comment 16 Jan 2010-03-20 13:06:38 UTC
Comment on attachment 224131 [details]
failed emerge of ct-ng-1.6.1

Eh, I just tried emerging again and it worked without problems.
Earlier failed build must have been a problem on my side...
Comment 17 Anthony Basile gentoo-dev 2010-05-31 11:29:30 UTC
Created attachment 233617 [details]
Version bump for 1.6.2

I haven't forgotten about this, I've just been lazy about uploading the ebuilds for the new releases.
Comment 18 Anthony Basile gentoo-dev 2010-05-31 11:29:56 UTC
Created attachment 233619 [details]
Version bump to 1.7.0
Comment 19 Anthony Basile gentoo-dev 2010-06-07 01:54:32 UTC
Created attachment 234349 [details]
Saner approach to non-standard build system

Re Comments #10 + #11: There isn't an elegant fix to the build system's --mandir problem.  I've make a patch to fix it and I'll try to get upstream to address the issue.  I also added bash-completion.
Comment 20 Anthony Basile gentoo-dev 2010-06-07 01:56:26 UTC
Created attachment 234351 [details, diff]
Patch used by ct-ng-1.7.0-r1.ebuild
Comment 21 Anthony Basile gentoo-dev 2010-07-11 18:26:00 UTC
Okay, I am aiming to commit this to the tree in a week or so.  I will attach the initial ebuild/patch/metadata.xml if anyone wants review them before I commit.  They are also on my overlay:

http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=summary

@toolchain: notice I am not including <herd>toolchain</herd>.

In the near future, I am planning to write a bash utility which installs/uninstalls the newly constructed toolchain somewhere on the filesystem and adds the appropriate env.d files so that it works with gcc-config as do other cross/native compilers.

I'm not sure where on the filesystem would be best, either /usr/local/tuplet or /var/lib/ct-ng/tuplet.  Ebuilds are not supposed to use /usr/local, but since the ebuild doesn't install the toolchain, only the toolchain builder, /usr/local does not seem inappropriate.

Comment 22 Anthony Basile gentoo-dev 2010-07-11 18:27:39 UTC
Created attachment 238333 [details]
ebuild for the latest stable release

This will go into sys-devel/ct-ng
Comment 23 Anthony Basile gentoo-dev 2010-07-11 18:28:40 UTC
Created attachment 238335 [details, diff]
Patch to fix the man page path
Comment 24 Anthony Basile gentoo-dev 2010-07-11 18:30:02 UTC
Created attachment 238337 [details]
Package metadata

Setting myself as the maintainer and taking full responsibility.
Comment 25 SpanKY gentoo-dev 2010-07-11 19:25:40 UTC
feel free to commit that then ... the man page issue should really be taken upstream, but if you want to maintain it, it's your call now
Comment 26 Anthony Basile gentoo-dev 2010-07-13 11:53:15 UTC
In the tree.
Comment 27 Yann E. MORIN 2010-07-15 17:31:20 UTC
Created attachment 238913 [details, diff]
Patch to fix the man page path

If this patch fixes the mandir issue for you, I'm ready to push it.