forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problems during toolchain build, about the pspsdk

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
SpaceForce



Joined: 15 Dec 2008
Posts: 12

PostPosted: Mon Dec 15, 2008 3:11 pm    Post subject: problems during toolchain build, about the pspsdk Reply with quote

I've got a fresh psptoolchain and pspsdk from SVN, version both 2448

When running the tool.sh script to 003-pspsdk-stage1.sh
output:
=================================================
checking for pspsdk version... 1.0+beta2
checking for pspdev... /opt/PSPDev/
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for psp-gcc... psp-gcc
checking for psp-g++... psp-g++
checking for psp-as... psp-as
checking for psp-ld... psp-ld
checking for psp-ar... psp-ar
checking for psp-nm... psp-nm
checking for psp-ranlib... psp-ranlib
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in `/opt/psptoolchain/build/pspsdk':
configure: error: C compiler cannot create executables
See `config.log' for more details.
=============================================

config.log(too long, so part of it)
============================================
configure:3086: checking for C compiler version
configure:3094: gcc --version >&5
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:3098: $? = 0
configure:3105: gcc -v >&5
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC)
configure:3109: $? = 0
configure:3116: gcc -V >&5
gcc: '-V' option must have argument
configure:3120: $? = 1
configure:3143: checking for C compiler default output file name
configure:3165: gcc conftest.c >&5
conftest.c:4:25: warning: missing terminating " character
conftest.c:5:1: warning: missing terminating " character
conftest.c:5: error: missing terminating " character
conftest.c:6:24: warning: missing terminating " character
conftest.c:7:1: warning: missing terminating " character
conftest.c:7: error: missing terminating " character
conftest.c:10:17: warning: missing terminating " character
conftest.c:11:1: warning: missing terminating " character
conftest.c:11: error: missing terminating " character
configure:3169: $? = 1
configure:3207: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "pspsdk"
| #define PACKAGE_TARNAME "pspsdk"
| #define PACKAGE_VERSION "1.0+beta2
"
| #define PACKAGE_STRING "pspsdk 1.0+beta2
"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "pspsdk"
| #define VERSION "1.0+beta2
"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3213: error: in `/opt/psptoolchain/build/pspsdk':
configure:3216: error: C compiler cannot create executables
See `config.log' for more details.
=====================================================

My environment:
================
OS: Fedora 10
GCC: 4.32
================
Back to top
View user's profile Send private message
geeses



Joined: 13 Jan 2009
Posts: 2

PostPosted: Sat Jan 17, 2009 2:55 pm    Post subject: Reply with quote

I have meet with the same problem too.


My environment is:
OS: Ubuntu 7.10
GCC: 4.2

This also occurs in WinXP with the lastest Cygwin.
Back to top
View user's profile Send private message
geeses



Joined: 13 Jan 2009
Posts: 2

PostPosted: Mon Jan 19, 2009 7:54 pm    Post subject: Reply with quote

The easiest way is to modify the ./configure file.

These 2 files are use 0x0D 0x0A at the end of a line as the Car-Return for the next line.
The 0x0D will be misrecognized as a new line and 0x0A for another too.

When the bootstrap file read the version, it write an unused Car-Return in ./configure file (see ./configure line 576).

The solution is:
After runned ./bootstrap.
Open the ./configure file with a text editor such as gedit.
Find the version "1.0+beta2".
Delete each Car-Return after the "1.0+beta2".
Save and exit.
Run the ./configure.

There are 10 such words in the file.
Show as below:
1. near line 3;
2. near line 575;
3. near line 576;
4. near line 1287;
5. near line 1353;
6. near line 1458;
7. near line 1471;
8. near line 2228;
9. near line 8612;
10. near line 8665.


Such as line 575:
Code:
PACKAGE_TARNAME='pspsdk'
PACKAGE_VERSION='1.0+beta2
'
PACKAGE_STRING='pspsdk 1.0+beta2
'
PACKAGE_BUGREPORT=''


It should be:
Code:
PACKAGE_TARNAME='pspsdk'
PACKAGE_VERSION='1.0+beta2'
PACKAGE_STRING='pspsdk 1.0+beta2'
PACKAGE_BUGREPORT=''









--------------Another difficult way------------------

The problem is because of the automatic generated content of conftest.c is(according to config.log):

| /* confdefs.h. */
| #define PACKAGE_NAME "pspsdk"
| #define PACKAGE_TARNAME "pspsdk"
| #define PACKAGE_VERSION "1.0+beta2
"
| #define PACKAGE_STRING "pspsdk 1.0+beta2
"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "pspsdk"
| #define VERSION "1.0+beta2"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }

(EOF)

So that it can not recognize the code correctly.
################################
conftest.c:5: error: missing terminating " character
conftest.c:7: error: missing terminating " character
################################

The correct code is:
Code:
/* confdefs.h.  */
#define PACKAGE_NAME "pspsdk"
#define PACKAGE_TARNAME "pspsdk"
#define PACKAGE_VERSION "1.0+beta2"
#define PACKAGE_STRING "pspsdk 1.0+beta2"
#define PACKAGE_BUGREPORT ""
#define PACKAGE "pspsdk"
#define VERSION "1.0+beta2"
/* end confdefs.h.  */

int
main ()
{

  ;
  return 0;
}


Save the code as a file with the name will not be removed by the ./configure(The file name should not start with "conf...") such as "asdf".
Then modify the ./configure by adding 3 lines:

First, near line 3045:
Code:
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`

cp asdf conftest.c
#
# List of possible output files, starting from the most likely.


Second, near line 3170:
Code:
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }

cp asdf conftest.c
if { (ac_try="$ac_link"


Third, near line 3232:
Code:
rm -f conftest.o conftest.obj

cp asdf conftest.c
if { (ac_try="$ac_compile"


After the modification, running ./configure again will make it config correctly.

Though I know that is not recommended, I don't know what is the better way to solute.
Back to top
View user's profile Send private message
jimparis



Joined: 10 Jun 2005
Posts: 1179
Location: Boston

PostPosted: Wed Jan 28, 2009 8:29 am    Post subject: Reply with quote

This is because the line endings weren't converted right in the checkout. I would guess that you checked out the SVN repository using a Windows client like TortoiseSVN, but then tried to build the files under Cygwin and Ubuntu.

I've changed svn:eol-style to LF for this file in revision 2452 which should avoid this problem.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Wed Jan 28, 2009 10:17 am    Post subject: Reply with quote

TurtoiseSVN/CVS have a preference for each repo on how to checkout the text as concerns the line endings. You don't need to change the svn, just make a note to Windows people about using the right mode on checkout. :)
Back to top
View user's profile Send private message AIM Address
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Wed Jan 28, 2009 8:04 pm    Post subject: Reply with quote

I always used TortoiseSVN and windows Native SVN clients (no cygwin) with their default installation configuration and I don't run into line termination issues when running from the DOS command line or from MSys shell. I used the latest SVN 1.5.5 on several machines XP Pro, XP Media Center, Vista Home Basic, so I guess that is a Cygwin issue...

just my 0.02€
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
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


Powered by phpBB © 2001, 2005 phpBB Group