Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Getting started with crossdev
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 12:14 pm    Post subject: Getting started with crossdev Reply with quote

Hi!

I'm trying to set up a crosscompile system for Windows. Unsuccessfully. From the very beginning. Documentation doesn't clarify it at all.

I'm creating a toolchain with command 'crossdev --targert x86_64-w64-mingw64'. And just here I have a question. How could I know, besides googled forum posts, about 'w64' (it's significantly), if not 'crossdev -t help' nor handbook (https://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1) doesn't say about it?

Code:
root@localhost /home/vanger % crossdev --target x86_64-pc-w64-mingw64
----------------------------------------------------------------------------------------------------------------
* crossdev version: 20140917
* Host Portage ARCH: amd64
* Target Portage ARCH: amd64
* Target System: x86_64-pc-w64-mingw64
* Stage: 4 (C/C++ compiler)
* ABIs: amd64

* binutils: binutils-[latest]
* gcc: gcc-[latest]
* libc: mingw64-runtime-[latest]

* CROSSDEV_OVERLAY: /usr/local/portage
* PORT_LOGDIR: /var/log/portage
* PORTAGE_CONFIGROOT:
* Portage flags:
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _
_ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _ - ~ - _
/usr/bin/emerge-wrapper: line 48: /eclass/toolchain-funcs.eclass: No such file or directory
/usr/bin/emerge-wrapper: line 49: tc-arch: command not found
!!! WARNING - Cannot auto-configure CHOST x86_64-pc-w64-mingw64
!!! You should edit /usr/x86_64-pc-w64-mingw64/etc/portage/make.conf
!!! by hand to complete your configuration
* Log: /var/log/portage/cross-x86_64-pc-w64-mingw64-binutils.log
* Emerging cross-binutils ...

* binutils failed :(
* If you file a bug, please attach the following logfiles:
* /var/log/portage/cross-x86_64-pc-w64-mingw64-info.log
* /var/log/portage/cross-x86_64-pc-w64-mingw64-binutils.log.xz
* /var/tmp/portage/cross-x86_64-pc-w64-mingw64/binutils*/temp/binutils-config.logs.tar.xz


/var/log/portage/cross-x86_64-pc-w64-mingw64-info.log: http://pastebin.com/Zz4r295c

What is missing in '/usr/x86_64-pc-w64-mingw64/etc/portage/make.conf'? If I set ARCH to amd64 or x86 (moreover, the first one, judging by the output, is set correctly autmatically), there's no warning and 'command no found' but 'emerge binutils' fails silently too.

When I set target 'x86_64-mingw64', target creation goes a bit further:
Code:
... [ ok ]
* Log: /var/log/portage/cross-x86_64-w64-mingw64-gcc-stage1.log
* Emerging cross-gcc-stage1 ...

What's the difference?

BTW, creation of target froom handbook (sh4-unknown-linux-gnu) fails too. But just on 'cross-gcc-stage2' step.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 1:42 pm    Post subject: Re: Getting started with crossdev Reply with quote

vanger wrote:
Code:
/usr/bin/emerge-wrapper: line 48: /eclass/toolchain-funcs.eclass: No such file or directory
/usr/bin/emerge-wrapper: line 49: tc-arch: command not found
!!! WARNING - Cannot auto-configure CHOST x86_64-pc-w64-mingw64
!!! You should edit /usr/x86_64-pc-w64-mingw64/etc/portage/make.conf
!!! by hand to complete your configuration
* Log: /var/log/portage/cross-x86_64-pc-w64-mingw64-binutils.log
* Emerging cross-binutils ...

* binutils failed :(

vanger ... this is failing because the MAIN_REPO_PATH (in emerge-wrapper) is not getting a value for some reason ... what is the output of the following:

Code:
# portageq repositories_configuration / | awk '{if ($1 == "main-repo") {main_repo = $NF} else if ($1 ~ /^\[/) {locs[repo_name] = loc ; repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1)} else if ($1 == "location") {loc = $3}} END {print(locs[main_repo])}'

... that should provide the path to the main repo (namely 'gentoo' ... mistakenly called 'portage') but my guess is it doesn't due to something in your setup (or general brokeness on crossdev's part).

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 1:49 pm    Post subject: Reply with quote

Quote:
what is the output of the following: ...

It outputs nothing.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 2:02 pm    Post subject: Reply with quote

vanger wrote:
Quote:
what is the output of the following: ...

It outputs nothing.

vanger ... ok, then its as I suspected ... what do you have in /etc/portage/repos.conf? Something like the following?

/etc/portage/repos.conf/gentoo.conf
Code:
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.us.gentoo.org/gentoo-portage

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 2:26 pm    Post subject: Reply with quote

Quote:
what do you have in /etc/portage/repos.conf?


I don't have such file at all.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 2:44 pm    Post subject: Reply with quote

vanger wrote:
Quote:
what do you have in /etc/portage/repos.conf?

I don't have such file at all.

vanger ... not so long ago the PORTDIR variable was replaced/superceded by repos.conf ... you probably missed the warning during the package merge (unless your portage is < portage-2.2.14 ... or there abouts). So, create one (using the above as a template ... and adjusting the 'sync-uri' and 'location' to match your geo-location and /path/to/).

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 3:12 pm    Post subject: Reply with quote

Quote:
not so long ago the PORTDIR variable was replaced/superceded by repos.conf ... you probably missed the warning during the package merge (unless your portage is < portage-2.2.14 ... or there abouts). So, create one (using the above as a template ... and adjusting the 'sync-uri' and 'location' to match your geo-location and /path/to/).

Yep, I didn't know that. So, I've created corresponding file and commented out SYNC in make.conf.

Here's the contents of my repos.conf
Code:
root@localhost /etc/portage % cat repos.conf
[DEFAULT]
main-repo = gentoo

[gentoo]
location = /usr/portage
sync-type = rsync
sync-uri = rsync://rsync.ru.gentoo.org/gentoo-portage

The result of attempt of creating toolchains is exactly the same as before.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 6:05 pm    Post subject: Reply with quote

vanger wrote:
The result of attempt of creating toolchains is exactly the same as before.

vanger ... did you run the above portageq command or simply 'portageq repositories_configuration /' on its own? Do either of these produce output? To rule it out, repos.conf is go+r?

Also, not having any previous experience with 'emerge-wrapper' I'm not sure where it expects this particular information to come from, the host or the chost ... and given the error above re "you should edit /usr/x86_64-pc-w64-mingw64/etc/portage/make.conf" it may actually be looking in the chost's */etc

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 6:33 pm    Post subject: Reply with quote

khayyam wrote:

did you run the above portageq command or simply 'portageq repositories_configuration /' on its own? Do either of these produce output?

I ran the whole script. It still doesn't produce any output. Here's the latter output:
Code:
vanger@localhost /home/vanger % portageq repositories_configuration /
[DEFAULT]
main-repo = gentoo

[crossdev]
location = /usr/local/portage
masters = gentoo
priority = 0

[gentoo]
location = /usr/portage
masters =
priority = -1000
sync-type = rsync
sync-uri = rsync://rsync.ru.gentoo.org/gentoo-portage


Quote:

To rule it out, repos.conf is go+r?

Sorry, don't understand it.

[/quote]
Also, not having any previous experience with 'emerge-wrapper' I'm not sure where it expects this particular information to come from, the host or the chost ... and given the error above re "you should edit /usr/x86_64-pc-w64-mingw64/etc/portage/make.conf" it may actually be looking in the chost's */etc
[/quote]
Probably I should. But I have no idea how. BTW, that warning shows only on the first run of ''crossdev --target'. If I run it with the same target it doesn't shows up.

Here's the contents of that file:
Code:
root@localhost /etc/portage % cat /usr/x86_64-pc-w64-mingw64/etc/portage/make.conf
CHOST=x86_64-pc-w64-mingw64
CBUILD=x86_64-pc-linux-gnu
ARCH=

HOSTCC=x86_64-pc-linux-gnu-gcc

ROOT=/usr/${CHOST}/

ACCEPT_KEYWORDS=" ~"

USE="${ARCH} -pam"

CFLAGS="-O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

FEATURES="-collision-protect sandbox buildpkg noman noinfo nodoc"
# Be sure we dont overwrite pkgs from another repo..
PKGDIR=${ROOT}packages/
PORTAGE_TMPDIR=${ROOT}tmp/

ELIBC="__LIBC__"

PKG_CONFIG_PATH="${ROOT}usr/lib/pkgconfig/"
#PORTDIR_OVERLAY="/usr/portage/local/"
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 7:59 pm    Post subject: Reply with quote

vanger wrote:
khayyam wrote:
did you run the above portageq command or simply 'portageq repositories_configuration /' on its own? Do either of these produce output?

I ran the whole script. It still doesn't produce any output.

vanger ... ok, that makes it a crossdev bug, and I think I can reproduce it. I don't have the energy right now to look any further ... but if you want a quick solution then add another repo (as that should essencially resolve it without code change).

vanger wrote:
khayyam wrote:
To rule it out, repos.conf is go+r?

Sorry, don't understand it.

Permissions ... group other + read.

edit: I took a quick look on bgo and its bug 528542 ... there is a patch there which should fix emerge-wrapper (note that as make.conf is incorrectly written you should probably also correct or replace the one emerge-wrapper created previously).

best ... khay
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 8:29 pm    Post subject: Reply with quote

vanger ... the patch attatched to the bug fails for me ... so I created a replacement (here). View as 'raw', save, then ...

Code:
# whoami
root
# patch -p0 -d /usr/bin <emerge-wrapper.patch

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 9:01 pm    Post subject: Reply with quote

Quote:
if you want a quick solution then add another repo (as that should essencially resolve it without code change).

Sorry, didn't get it too.

Quote:
Permissions ... group other + read.

Here it is:
Code:
vanger@localhost /etc/portage % ls -l repos.conf
-rw-r--r-- 1 root root 135 Feb 11 18:50 repos.conf


Quote:
the patch attatched to the bug fails for me ... so I created a replacement (here).

Oh thanks a lot for your time!

I applied it, but unfortunately it didn't work for me -- situation is the same after it.
To be sure that the patch is applied, here's the potentially problematic place in my '/usr/bin/emerge-wrapper':
Code:
# Probably shouldn't hardcode "gentoo" here.
MAIN_REPO_PATH=$(portageq repositories_configuration / | gawk '
        {
                if ($1 == "main-repo") {
                        main_repo = $NF
                } else if ($1 ~ /^\[/) {
                        locs[repo_name] = loc
                        repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1)
                } else if ($1 == "location") {
                        loc = $3
                }
        } END {
                locs[repo_name] = loc
                print(locs[main_repo])
        }
')
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 10:18 pm    Post subject: Reply with quote

vanger wrote:
I applied it, but unfortunately it didn't work for me -- situation is the same after it.

vanger ... when you say the situation is the same, you mean that MAIN_REPO_PATH is empty, or something else? ... because it works here:

Code:
$ $ awk '{if ($1 == "main-repo") {main_repo = $NF} else if ($1 ~ /^\[/) {locs[repo_name] = loc ; repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1)} else if ($1 == "location") {loc = $3}} END {locs[repo_name] = loc ; print(locs[main_repo])}' input
/usr/portage

... where 'input' is the output of 'portageq' you provided above. So, not "the same", it has to be something else.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Wed Feb 11, 2015 10:40 pm    Post subject: Reply with quote

You're right, your code does the job:
Code:
vanger@localhost /usr/bin % portageq repositories_configuration / | awk '{if ($1 == "main-repo") {main_repo = $NF} else if ($1 ~ /^\[/) {locs[repo_name] = loc ; repo_name = gensub(/\[([^\]]*)\]/, "\\1", "", $1)} else if ($1 == "location") {loc = $3}} END {locs[repo_name] = loc ; print(locs[main_repo])}'
/usr/portage


I meant the output of crossdev target creation.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Wed Feb 11, 2015 11:04 pm    Post subject: Reply with quote

vanger wrote:
You're right, your code does the job: [...] I meant the output of crossdev target creation.

vanger ... honestly, I gave up with crossdev as you spend more time with trifling little problems like this than actually building your target. Anyhow, all I can do is agree with you because I can see what you see and so perhaps have some idea of why that might be the case. Note that in the above bug the reporter stated issues with make.conf creation, so have you tried to remove and recreate them? Its quite possible your CHOST isn't setup correctly, and the 'cannot auto-configure CHOST' is probably due to crossdev not understanding how make.conf should be setup for that target ... so that's probably the best place to start.

edit: btw the ACCEPT_KEYWORDS=" ~" in the above make.conf is the issue reported in the above bug, its wrong, though I'm not sure what keyword you should be using with target, I imagine 'amd64'.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Thu Feb 12, 2015 12:16 am    Post subject: Reply with quote

khayyam wrote:
I gave up with crossdev as you spend more time with trifling little problems like this than actually building your target.

Small step for mankind, giant leap for a man :) That problems wasn't little for me.

I have not a single idea of how should I just build the target. The main source of information I have is an "Embedded handbook" which doesn't seem to be very useful in solving that problems. At least for my level of awareness of how Gentoo works.

You had an assumption that the issue was the bug in emerge wrapper:
Quote:
this is failing because the MAIN_REPO_PATH (in emerge-wrapper) is not getting a value for some reason

And it turned out to be true. How did you come to it? Because after you fixed it, 'crossdev --targert x86_64-w64-mingw64' output didn't change at all, and this is all information you had.

Quote:

Note that in the above bug the reporter stated issues with make.conf creation, so have you tried to remove and recreate them?

No. You mean '/usr/x86_64-pc-w64-mingw64/etc/portage/make.conf'?

Quote:

Its quite possible your CHOST isn't setup correctly, and the 'cannot auto-configure CHOST' is probably due to crossdev not understanding how make.conf should be setup for that target ... so that's probably the best place to start.

There are issues with target creation with every CHOST I tried. Even with the one from handbook (there's no that warning for it, btw). But for some reason they all fail on different moments: binutils, gcc-stage1, gcc-stage2.

Quote:
btw the ACCEPT_KEYWORDS=" ~" in the above make.conf is the issue reported in the above bug, its wrong, though I'm not sure what keyword you should be using with target, I imagine 'amd64'.

It's set to "amd64 ~amd64" now.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Feb 12, 2015 10:36 am    Post subject: Reply with quote

vanger wrote:
khayyam wrote:
I gave up with crossdev as you spend more time with trifling little problems like this than actually building your target.

Small step for mankind, giant leap for a man :) That problems wasn't little for me.

vanger ... I mean 'little problems' in terms of code ... like the assignment of 'loc' in the above awk, or how CROSSDEV_OVERLAY is acquired via 'parse_repo_config()'. The later exposes a bigger problem, how we namespace, but its something of an annoyance when crossdev dumps files into repos it has no business with, or writing garbage to /etc/portage/. Both of those issues could be avoided, and so the code simpler, if we didn't do things the way we currently do ... but 'little problems' tend to accumulate into bigger problems and so require the likes of the above to extract MAIN_REPO_PATH.

vanger wrote:
I have not a single idea of how should I just build the target. The main source of information I have is an "Embedded handbook" which doesn't seem to be very useful in solving that problems. At least for my level of awareness of how Gentoo works.

Yes, and its embedded that crossdev is really directed toward. I'm not sure of anything I could point you to that would provide more information than whats in the handbook.

vanger wrote:
You had an assumption that the issue was the bug in emerge wrapper:

khayyam wrote:
this is failing because the MAIN_REPO_PATH (in emerge-wrapper) is not getting a value for some reason

And it turned out to be true. How did you come to it? Because after you fixed it, 'crossdev --targert x86_64-w64-mingw64' output didn't change at all, and this is all information you had.

I could see from the error that emerge-wrapper wasn't able to find an eclass, that error pointed me to the line in emerge-wrapper that was failing, and looking at that I could see that MAIN_REPO_PATH wasn't getting a value. This had to be either portageq not returning the required info, or the extraction of that info by awk was failing. The fact that you still have the same error I can't explain, at least not without seeing that error.

vanger wrote:
khayyam wrote:
Note that in the above bug the reporter stated issues with make.conf creation, so have you tried to remove and recreate them?

No. You mean '/usr/x86_64-pc-w64-mingw64/etc/portage/make.conf'?

Yes, but as we can't be sure that any of what crossdev has done is correct I'd suggest you run --clean and start from scratch.

vanger wrote:
khayyam wrote:
Its quite possible your CHOST isn't setup correctly, and the 'cannot auto-configure CHOST' is probably due to crossdev not understanding how make.conf should be setup for that target ... so that's probably the best place to start.

There are issues with target creation with every CHOST I tried. Even with the one from handbook (there's no that warning for it, btw). But for some reason they all fail on different moments: binutils, gcc-stage1, gcc-stage2.

Oh, I don't want to guess why that might be ... it could be the ACCEPT_KEYWORDS definition caused by the above, but that's speculation. Without seeing the actual errors I can only guess.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Tue Feb 17, 2015 2:10 am    Post subject: Reply with quote

khayyam wrote:
Without seeing the actual errors I can only guess.

Where should I look in to see errors? For example, if I try to create a toolchain for mingw32 following Gentoo wiki article about MinGW all I get is a sudden error:
Code:
root@localhost /etc/portage % crossdev -t i686-pc-mingw32
----------------------------------------------------------------------------------------------------------------
 * crossdev version:      20140917
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   x86
 * Target System:         i686-pc-mingw32
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[latest]
 * gcc:                   gcc-[latest]
 * headers:               w32api-[latest]
 * libc:                  mingw-runtime-[latest]

 * CROSSDEV_OVERLAY:      /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:   
 * Portage flags:         
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _
 * leaving sys-devel/binutils in /usr/local/portage
 * leaving sys-devel/gcc in /usr/local/portage
 * leaving dev-util/w32api in /usr/local/portage
 * leaving dev-util/mingw-runtime in /usr/local/portage
 * leaving sys-devel/gdb in /usr/local/portage
  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _
 * Log: /var/log/portage/cross-i686-pc-mingw32-binutils.log
 * Emerging cross-binutils ...                                                                            [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-w32api-quick.log
 * Emerging cross-w32api-quick ...                                                                        [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-mingw-runtime-headers.log
 * Emerging cross-mingw-runtime-headers ...                                                               [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-gcc-stage1.log
 * Emerging cross-gcc-stage1 ...                                                                          [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-w32api.log
 * Emerging cross-w32api ...                                                                              [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-mingw-runtime.log
 * Emerging cross-mingw-runtime ...                                                                       [ ok ]
 * Log: /var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log
 * Emerging cross-gcc-stage2 ...

 * gcc failed :(
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-i686-pc-mingw32-info.log
 * /var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log.xz
 * /var/tmp/portage/cross-i686-pc-mingw32/gcc*/temp/gcc-config.logs.tar.xz

and no information about it.

/var/log/portage/cross-i686-pc-mingw32-info.log: http://pastebin.com/xB3MVphi

I didn't find any verbose or smth option for crossdev.


Last edited by vanger on Tue Feb 17, 2015 3:10 am; edited 1 time in total
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Feb 17, 2015 2:23 am    Post subject: Reply with quote

vanger wrote:
khayyam wrote:
Without seeing the actual errors I can only guess.

Where should I look in to see errors? For example, if I try to create a toolchain for mingw32 following Gentoo wiki article about MinGW all I get is a sudden error:
Code:
 * If you file a bug, please attach the following logfiles:
 * /var/log/portage/cross-i686-pc-mingw32-info.log
 * /var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log.xz
 * /var/tmp/portage/cross-i686-pc-mingw32/gcc*/temp/gcc-config.logs.tar.xz

and no information about it.

vanger ... most of the useful information will be in the other two (compressed) logs.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Tue Feb 17, 2015 2:54 am    Post subject: Reply with quote

khayyam wrote:
most of the useful information will be in the other two (compressed) logs.

Here they are.
/var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log.xz: https://dl.dropboxusercontent.com/u/6307148/cross-i686-pc-mingw32-gcc-stage2.log.xz
/var/tmp/portage/cross-i686-pc-mingw32/gcc*/temp/gcc-config.logs.tar.xz: https://dl.dropboxusercontent.com/u/6307148/gcc-config.logs.tar.xz

Piece of information from the end of the first one (skipping enormously long lines):
Code:

Makefile:416: recipe for target 'sanitizer_libc.lo' failed
make[4]: *** [sanitizer_libc.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
mv -f .deps/sanitizer_common_libcdep.Tpo .deps/sanitizer_common_libcdep.Plo
mv -f .deps/sanitizer_libignore.Tpo .deps/sanitizer_libignore.Plo
mv -f .deps/sanitizer_linux.Tpo .deps/sanitizer_linux.Plo

...

make[3]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build/i686-pc-mingw32/libgfortran'
make[2]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build/i686-pc-mingw32/libgfortran'
mv -f .deps/sanitizer_allocator.Tpo .deps/sanitizer_allocator.Plo
make[4]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build/i686-pc-mingw32/libsanitizer/sanitizer_common'
Makefile:435: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build/i686-pc-mingw32/libsanitizer'
Makefile:305: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build/i686-pc-mingw32/libsanitizer'
Makefile:9759: recipe for target 'all-target-libsanitizer' failed
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/build'
Makefile:856: recipe for target 'all' failed
make: *** [all] Error 2
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Feb 17, 2015 12:17 pm    Post subject: Reply with quote

vanger wrote:
Piece of information from the end of the first one (skipping enormously long lines):
Code:
Makefile:416: recipe for target 'sanitizer_libc.lo' failed
make[4]: *** [sanitizer_libc.lo] Error 1

vanger ... yes, but before this we have have some warnings about -fPIC and the following:

Code:
bc.cc: In function ‘void __sanitizer::break_optimization(void*)’:
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.9.2/work/gcc-4.9.2/libsanitizer/sanitizer_common/sanitizer_libc.cc:21:8: error: expected ‘(’ before ‘;’ token  __asm;

So, this seems to be a bug in gcc-4.9.2 rather than an issue with crossdev ... I would try building your target using stable rather than ~arch.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Tue Feb 17, 2015 2:09 pm    Post subject: Reply with quote

khayyam wrote:

So, this seems to be a bug in gcc-4.9.2 rather than an issue with crossdev ... I would try building your target using stable rather than ~arch.

I ran crossdev with --stable flag but it failed too:

/var/log/portage/cross-i686-pc-mingw32-info.log: https://dl.dropboxusercontent.com/u/6307148/stable/cross-i686-pc-mingw32-info.log
/var/log/portage/cross-i686-pc-mingw32-gcc-stage2.log.xz: https://dl.dropboxusercontent.com/u/6307148/stable/cross-i686-pc-mingw32-gcc-stage2.log.xz
/var/tmp/portage/cross-i686-pc-mingw32/gcc*/temp/gcc-config.logs.tar.xz: https://dl.dropboxusercontent.com/u/6307148/stable/gcc-config.logs.tar.xz

Part of log:
Code:
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/gcc-4.8.3/libsanitizer/interception/interception_win.cc: In function ‘void __interception::WriteJumpInstruction(char*, char*)’:
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/gcc-4.8.3/libsanitizer/interception/interception_win.cc:52:3: error: ‘ptrdiff_t’ was not declared in this scope
   ptrdiff_t offset = to - jmp_from - 5;
   ^
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/gcc-4.8.3/libsanitizer/interception/interception_win.cc:52:13: error: expected ‘;’ before ‘offset’
   ptrdiff_t offset = to - jmp_from - 5;
             ^
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/gcc-4.8.3/libsanitizer/interception/interception_win.cc:54:15: error: expected primary-expression before ‘)’ token
   *(ptrdiff_t*)(jmp_from + 1) = offset;
               ^
/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/gcc-4.8.3/libsanitizer/interception/interception_win.cc:54:33: error: ‘offset’ was not declared in this scope
   *(ptrdiff_t*)(jmp_from + 1) = offset;
                                 ^
...
Makefile:338: recipe for target 'interception_win.lo' failed
make[3]: *** [interception_win.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/build/i686-pc-mingw32/libsanitizer/interception'
Makefile:326: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/cross-i686-pc-mingw32/gcc-4.8.3/work/build/i686-pc-mingw32/libsanitizer'
Makefile:9763: recipe for target 'all-target-libsanitizer' failed
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: *** Waiting for unfinished jobs....
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Feb 17, 2015 4:29 pm    Post subject: Reply with quote

vanger ...

is bug 536738 yours? If not then it seems to be the same issue.

best ... khay
Back to top
View user's profile Send private message
vanger
n00b
n00b


Joined: 04 Jan 2014
Posts: 56

PostPosted: Tue Feb 17, 2015 5:03 pm    Post subject: Reply with quote

khayyam wrote:
is bug 536738 yours?

Looks very similar. But, I have issues not only with x86. I get
Code:
make[3]: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/gcc-4.8.4/work/build/sh4-unknown-linux-gnu/libsanitizer/asan'
Makefile:326: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/cross-sh4-unknown-linux-gnu/gcc-4.8.4/work/build/sh4-unknown-linux-gnu/libsanitizer'
Makefile:9768: recipe for target 'all-target-libsanitizer' failed
make[1]: *** [all-target-libsanitizer] Error 2
make[1]: *** Waiting for unfinished jobs....
true  DO=all multi-do # make

for 'sh4-unknown-linux-gnu' target.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Tue Feb 17, 2015 7:01 pm    Post subject: Reply with quote

vanger wrote:
khayyam wrote:
is bug 536738 yours?

Looks very similar. But, I have issues not only with x86. I get [...] for 'sh4-unknown-linux-gnu' target.

vanger ... then this may just be a problem with crossdev. As I said, I gave up on it, if I were to looking to build for a sh4 then I'd grab a system image of Aboriginal Linux for that target and build it ... no fuss, no bother.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum