Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crossdev with MinGW : cross emerge claims existing simlinks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Thu Jul 11, 2013 3:40 pm    Post subject: crossdev with MinGW : cross emerge claims existing simlinks Reply with quote

Hi all,

I need to set up a cross compiler environment with MinGW for building and testing my application. I have followed :


Code:
emerge -av crossdev
# switched /etc/portage/package.* to directories
# added "/usr/local/portage/cross-i686-pc-mingw32" into PORTDIR_OVERLAY
crossdev --ov-output /usr/local/portage -t i686-pc-mingw32
emerge-wrapper --init


Code:
# ls -l /usr/i686-pc-mingw32/etc/make.profile
lrwxrwxrwx 1 root root 30 11 juil. 12:08 /usr/i686-pc-mingw32/etc/make.profile -> /usr/portage/profiles/embedded


The cross compiler looks working :
Code:
$ cd test
$ echo 'int main(){return 0;}' > test.c
$ i686-pc-mingw32-gcc -Wall test.c -o test
$ file test
test: PE32 executable (console) Intel 80386 (stripped to external PDB), for MS Windows
$ wine test.exe


But when I try to cross-emerge, I have the following error :
Code:
# i686-pc-mingw32-emerge net-libs/zeromq
!!! /usr/i686-pc-mingw32/etc/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)

Calculating dependencies... done!
 * ARCH is not set... Are you missing the '/usr/i686-pc-
 * mingw32/etc/portage/make.profile' symlink? Is the symlink correct? Is
 * your portage tree complete?


Here is my cross make.conf :
Code:
CHOST=i686-pc-mingw32
CBUILD=x86_64-pc-linux-gnu
ARCH=x86
#ARCH=mingw32

HOSTCC=x86_64-pc-linux-gnu-gcc
E_MACHINE=EM_386

ROOT=/usr/${CHOST}/
# SYSROOT : http://www.gentoo.org/proj/en/base/embedded/handbook/index.xml?part=1&chap=3  §3.b, PORTAGE_CONFIGROOT §3.c
SYSROOT=$ROOT
PORTAGE_CONFIGROOT=$ROOT

ACCEPT_KEYWORDS="x86 ~x86"

USE="${ARCH} zlib bindist make-symlinks minimal"

#MARCH_TUNE="-march=armv4t -mtune=arm9tdmi"   #arm-softfloat-linux-uclibc
#MARCH_TUNE="-march=armv5t -mtune=xscale"   #armv5teb-softfloat-linux-gnueabi
MARCH_TUNE="-march=x86"

CFLAGS="-O2 -pipe ${MARCH_TUNE} -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/"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PORTDIR_OVERLAY="/usr/local/portage/cross-i686-pc-mingw32 /usr/local/portage/layman/pro-audio /usr/local/portage/layman/java-overlay /usr/local/portage/layman/science /usr/local/portage/layman/kde-sunset /usr/local/portage/layman/mornifle-gentoo-package /usr/local/portage/layman/dev-zero /usr/local/portage/layman/dilfridge /usr/local/portage/layman/sunrise /usr/local/portage/layman/nx /usr/local/portage/layman/multimedia /usr/local/portage/layman/pythonhead /usr/local/portage/layman/ikelos /usr/local/portage/layman/godin /usr/local/portage/layman/ibormuth /usr/local/portage/layman/gamerlay /usr/local/portage/layman/seden /usr/local/portage/layman/sabayon /usr/local/portage/layman/sage-on-gentoo /usr/local/portage/layman/flora /usr/local/portage /usr/local/portage/mesEbuilds"
MAKEOPTS="-j9 --load-average=8"
GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ ftp://gentoo.imj.fr/pub/gentoo/ ftp://mirror.ovh.net/gentoo-distfiles/ http://gentoo.modulix.net/gentoo/ http://ftp.club-internet.fr/pub/mirrors/gentoo/ http://mirror.ovh.net/gentoo-distfiles/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"


Any idea please ?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9133

PostPosted: Thu Jul 11, 2013 9:18 pm    Post subject: Reply with quote

What is the output of ls -l /usr/i686-pc-mingw32/etc/make.profile?
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Fri Jul 12, 2013 7:33 am    Post subject: Reply with quote

Here it is :
Code:
# ls -l /usr/i686-pc-mingw32/etc/make.profile
lrwxrwxrwx 1 root root 30 11 juil. 12:08 /usr/i686-pc-mingw32/etc/make.profile -> /usr/portage/profiles/embedded
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9133

PostPosted: Fri Jul 12, 2013 9:45 pm    Post subject: Reply with quote

What is the output of ls -l /usr/i686-pc-mingw32/usr/portage?
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Mon Jul 15, 2013 10:01 am    Post subject: Reply with quote

undefined
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Tue Jul 16, 2013 2:39 pm    Post subject: Reply with quote

I have added :
Code:
ln -s /usr/portage/profiles/embedded /usr/i686-pc-mingw32/etc/portage/make.profile
mkdir /usr/i686-pc-mingw32/usr/portage
/usr/i686-pc-mingw32/usr/portage/distfiles
i686-pc-mingw32-emerge --sync


But when I try to emerge something :
Code:
# i686-pc-mingw32-emerge app-portage/eix
!!! /usr/i686-pc-mingw32/etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)

Calculating dependencies... done!
 * ARCH is not set... Are you missing the '/usr/i686-pc-
 * mingw32/etc/portage/make.profile' symlink? Is the symlink correct? Is
 * your portage tree complete?


I have defined the simlink as requested (cf 1st line). So ?
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9133

PostPosted: Tue Jul 16, 2013 9:59 pm    Post subject: Reply with quote

It looks like you synced into the wrong directory. However, there was no need for you to sync a second copy of the tree at all. In most cases, you want /usr/sysroot/usr/portage to link to /usr/portage.
Back to top
View user's profile Send private message
beatfinger
n00b
n00b


Joined: 07 Nov 2006
Posts: 13

PostPosted: Wed Jul 17, 2013 1:40 pm    Post subject: Reply with quote

I'm having a similar issue, but with arm. I set up a link from /usr/armv5te-softfloat-linux-gnueabi/usr/portage to /usr/portage, but I'm still getting the ARCH error.

Code:

jrsmith3@gentoo ~ $ ls -l /usr/armv5te-softfloat-linux-gnueabi/usr/
total 20
drwxr-xr-x  2 root root 4096 Jul 16 02:57 bin
drwxr-xr-x 31 root root 4096 Jul 16 02:57 include
drwxr-xr-x  5 root root 4096 Jul 16 02:57 lib
lrwxrwxrwx  1 root root   12 Jul 16 23:51 portage -> /usr/portage
drwxr-xr-x  2 root root 4096 Jul 16 02:57 sbin
drwxr-xr-x  5 root root 4096 Jul 16 02:57 share
jrsmith3@gentoo ~ $ ls -l /usr/armv5te-softfloat-linux-gnueabi/etc/
total 8
lrwxrwxrwx 1 root root   30 Jul 15 23:08 make.profile -> /usr/portage/profiles/embedded
drwxr-xr-x 2 root root 4096 Jul 16 23:05 portage
-rw-r--r-- 1 root root 1615 Jul 16 02:55 rpc
jrsmith3@gentoo ~ $ sudo armv5te-softfloat-linux-gnueabi-emerge tslib
Password:

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.

Calculating dependencies... done!
 * ARCH is not set... Are you missing the '/usr/armv5te-softfloat-linux-
 * gnueabi/etc/portage/make.profile' symlink? Is the symlink correct? Is
 * your portage tree complete?
Back to top
View user's profile Send private message
lalebarde
Guru
Guru


Joined: 03 Sep 2006
Posts: 464
Location: France, Haute-Garonne

PostPosted: Thu Jul 18, 2013 11:05 am    Post subject: Reply with quote

@Hu : Thanks for the tip. I have deleted /usr/i686-pc-mingw32/usr/portage and made a link instead to /usr/portage.

For the rest, the problem remains the same :
Code:
# i686-pc-mingw32-emerge app-portage/eix
!!! /usr/i686-pc-mingw32/etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /usr/portage/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)

Calculating dependencies... done!
 * ARCH is not set... Are you missing the '/usr/i686-pc-
 * mingw32/etc/portage/make.profile' symlink? Is the symlink correct? Is
 * your portage tree complete?
Back to top
View user's profile Send private message
univerz
n00b
n00b


Joined: 02 Nov 2005
Posts: 6
Location: Slovakia

PostPosted: Wed Sep 04, 2013 3:32 pm    Post subject: Reply with quote

same here. any good news?
Back to top
View user's profile Send private message
theism
n00b
n00b


Joined: 12 Sep 2013
Posts: 1
Location: Chernigov

PostPosted: Thu Sep 12, 2013 5:25 pm    Post subject: Reply with quote

One solution to:
I add to /usr/portage/profiles/embedded/make.defaults:
ARCH="x86"

But I'm not sure, maybe requires: x86-winnt
-------------- On russian ------------------
Одно из решений:
Я добавил в /usr/portage/profiles/embedded/make.defaults:
ARCH="x86"
Но не уверен, возможно корректней указать: x86-winnt
Установка пошла.
Back to top
View user's profile Send private message
jingwuyan218
n00b
n00b


Joined: 27 Jan 2014
Posts: 1

PostPosted: Mon Jan 27, 2014 1:34 pm    Post subject: Reply with quote

for armv7 :
ln -s /usr/portage/profile/arch/arm/armv7 /usr/arm-cortex-a8*/etc/make.profile .

试试看。like this
_________________
追求完美,必然艰辛
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
Page 1 of 1

 
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