tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New:Cross compiling for powerpc-netbsd on i386-netbsd: pkgsrc.



Hi, 

I have narowed the problem down.
First i got bad checksum on binutils-2.9.1.tar.gz and
when i replaced that file with a good one and did make install etc.
Those problems that i listed before apperd.

I solved this by removing the pkgsrc and reinstalled it.
then i manully put all files nided in pkgsrc/distfiles.

Then i run make install in cross/powerpc-netbsd.
Fisrt problem was:
*** The command 'cc -o conftest -O2   -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
-Wl,-R/usr/pkg/lib -L/usr/pkg/lib conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
*** Error code 1

The problem was in binutils/work/binutils-2.9.1/configure.in
if i comment out the exit 1 in the conftest, the make install carried
on.

After som time make returned to binutils and configure was set again.
so for the second time i put a comment on exit 1.
Like this:
echo "int main () { return 0; }" > conftest.c
${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
if [ $? = 0 ] && [ -s conftest -o -s conftest.exe ]; then
  :
else
  echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS}
${LDFLAGS}
 conftest.c' failed."
  echo 1>&2 "*** You must set the environment variable CC to a working
compiler.
"
  rm -f conftest*
#  exit 1                <--- changed by MEEEEEE
fi
rm -f conftest*


Then i did make install for the third time.
when make went in to egcs i got this.
when trying to do cccp:
cc -DCROSS_COMPILE -DIN_GCC    -O2  -DHAVE_CONFIG_H -DHAIFA    -I. -I.
-I./confi
g \
 
-DGCC_INCLUDE_DIR=\"/usr/pkg/cross/lib/gcc-lib/powerpc-netbsd/egcs-2.91.
60/inc
lude\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/pkg/cross/powerpc-netbsd/include/g++\"
\
  -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/pkg/cross/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/pkg/cross/powerpc-netbsd/sys-include\" \
  -DTOOL_INCLUDE_DIR=\"/usr/pkg/cross/powerpc-netbsd/include\" \
  -c `echo ./cccp.c | sed 's,^\./,,'`
/tmp/cckhxP2V.s: Assembler messages:
/tmp/cckhxP2V.s:339: Error: Unrecognized opcode: `pushl'
/tmp/cckhxP2V.s:340: Error: Unrecognized opcode: `movl'
/tmp/cckhxP2V.s:341: Error: Unrecognized opcode: `pushl'
/tmp/cckhxP2V.s:342: Error: Unrecognized opcode: `pushl'
/tmp/cckhxP2V.s:343: Error: Unrecognized opcode: `pushl'
/tmp/cckhxP2V.s:344: Error: Unrecognized opcode: `movl'
/tmp/cckhxP2V.s:345: Error: Unrecognized opcode: `movl'
etc etc 
/tmp/ccar9LTc.s:20697: Error: Unrecognized opcode: `ret'
gmake: *** [cccp.o] Error 1
*** Error code 2

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
streamserver.billing$ 

As before help needed.

Regards Roger Strandberg

> Hi
> 
> HELP!!!!
> Host env:
> i386 netbsd1.4.1
> 
> I'm trying to make a cross compiler with preconf cross in /usr/pkgsrc
> 
> I DO:
> cd /usr/pkgsrc/cross/powerpc-netbsd
> THEN:
> make reinstall clean clean-depends
> 
> .........
> ===>  Returning to build of cross-powerpc-netbsd-1.3.0.0
> ===>  cross-powerpc-netbsd-1.3.0.0 depends on package:
> cross-binutils-2.9.1.1
> ===>  Verifying reinstall for ../../cross/binutils
> ===>  Patching for cross-binutils-2.9.1.1
> ===>  Applying NetBSD patches for cross-binutils-2.9.1.1
> patch: **** can't cd to
/usr/pkgsrc/cross/binutils/work/binutils-2.9.1:
> No such 
> file or directory
> Patch /usr/pkgsrc/cross/binutils/patches/patch-aa failed
> *** Error code 1
> 
> SO:
> I install the binutils-2.9.1 with 
> tar -xzf /usr/pkgsrc/distfiles/binutils-2.9.1.tar.gz
> 
> 
> And away we go:
> make reinstall clean clean-depends
> 
> 
> ===>  Returning to build of cross-powerpc-netbsd-1.3.0.0
> ===>  cross-powerpc-netbsd-1.3.0.0 depends on package:
> cross-binutils-2.9.1.1
> ===>  Verifying reinstall for ../../cross/binutils
> ===>  Patching for cross-binutils-2.9.1.1
> ===>  Applying NetBSD patches for cross-binutils-2.9.1.1
> ===>  Configuring for cross-binutils-2.9.1.1
> Created "Makefile" in /usr/pkgsrc/cross/binutils/work/binutils-2.9.1
> using "mt-f
> rag"
> collect2: ld returned 33 exit status
> *** The command 'cc -o conftest -O2   -Wl,-R/usr/pkg/lib
-L/usr/pkg/lib
> -Wl,-R/u
> sr/pkg/lib -L/usr/pkg/lib conftest.c' failed.
> *** You must set the environment variable CC to a working compiler.
> *** Error code 1
> 
> It dosn't matter if i change the CC, thus in the Makefile in 
> /usr/pkgsrc/cross/binutils on line 20 i say's
> CONFIGURE_ARGS+=        --enable-targets=${ENABLE_TARGETS_LIST} \
>                         --target=i386-linux
> 
> why? i386-linux?
> 
> I have a cross compiler env for powerpc, made out of Binutils and Gcc.
> But that one is only for making the "bios" in my card.
> And also when trying to compile netbsd with my "home made" cross
> compiler it complains that it is no egcs.
> 
> I have looked at http://www.netbsd.org/Ports/bebox/cross.html
> and it just says:
> 1.Get pkgsrc.tar.gz and extract on /usr/pkgsrc. 
>    2.Make and install. 
>           % cd /usr/pkgsrc/cross/powerpc-netbsd 
>           # make install clean clean-depends 
>    3.Get ppc-make script. 
> 
> So why does it not work for me?????
> 
> My hole weekend was now wasted on trying to make this work, sadly...
> 
> Help wanted.
> 
> Regards Roger Strandberg
> 




Home | Main Index | Thread Index | Old Index