Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-19 Thread Pedro Alves
Please don't top post.

Ximsce wrote:
> I don't get any int return warnings, the only output from compilation is:
>
> Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import)
>
> which has something to do with multi-threading, I believe.

OK, this is normal.

Below is
> almost the exact code that worked yesterday morning (I unfortunately
> don't have an exact copy of the code that worked), before I started to
> complicate things.  If I comment out the execv(), everything else works.
>   I have tested the lame.exe by itself, and it works, too.  I am
> compiling with arm-wince-cegcc-gcc and then copying to Windows Mobile 5.
>
>char *args[3];
>args[0] = LAME_EXECUTABLE;
>args[1] = TEST_WAV_FILE;
>args[2] = TEST_MP3_OUT;
>
>execv(LAME_EXECUTABLE, args);
>

You didn't NULL terminate the argument list:
http://www.opengroup.org/onlinepubs/95399/functions/exec.html

"The argument argv is an array of character pointers to
null-terminated strings. The application shall ensure that the last
member of this array is a null pointer. These strings shall constitute
the argument list available to the new process image. The value in
argv[0] should point to a filename that is associated with the process
being started by one of the exec functions."

Try this:

char *args[4];
args[0] = LAME_EXECUTABLE;
args[1] = TEST_WAV_FILE;
args[2] = TEST_MP3_OUT;
args[3] = NULL;

execv(LAME_EXECUTABLE, args);

Cheers,
Pedro Alves

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-19 Thread Danny Backx
On Mon, 2007-06-18 at 22:41 -0600, Ximsce wrote:
> The exception handling doesn't seem to be working, I'm compiling from 
> subversion at the moment (takes 2 hours on my sadly out-dated computer). 
>   What version would you say is in the repository?

Unfortunately it's not in the repository. I'll create a 0.50 release
today (if all goes well), then commit the exception handling code for
cegcc, then continue developing the same thing for mingw32ce (I've only
got a prototype for it right now, needs to be integrated with the
toolset).

Danny

> Gdb fails saying it can't find .synce/active_connection which I'm 
> guessing is because I'm connected to the iPaq through synce-gnome and 
> odccm compiled out of their respective repositories (so non-standard)...
> 
> I'm perfectly willing to blame the iPaq I'm using for this issue, as it 
> was right after it crashed running my application that things stopped 
> working.  I'm considering resetting to factory defaults, but I'm not 
> sure how well that would go over with its owner.
> 
> Cheers,
> Matt
> 
> Danny Backx wrote:
> > On Sun, 2007-06-17 at 22:14 -0600, Ximsce wrote:
> >> Sorry to keep spamming the list with these newbie questions, but I'm in 
> >> a bit of a bind and my deadline approaches.
> >>
> >> I had a program that was working fine, and suddenly a bunch of included 
> >> methods have stopped working (causing immediate exit of the program, 
> >> without even flushing my log file).  Functions that are failing include 
> >> execv(), glob(), and strcat().  I read in the documentation that this 
> >> could be caused by a conflict between the coredll and cegcc.dll for 
> >> stdio functions.  Is there a way to force arm-wince-cegcc-gcc to compile 
> >> with the cegcc.dll versions of libraries?  When I run 
> >> arm-wince-cegcc-objdump it appears to be including these functions from 
> >> cegcc.dll, but I'm not entirely positive about the output of that tool.
> > 
> > Debugging on an embedded system can be such fun :-)
> > 
> > Two ideas that may be of help in determining the cause, or the exact
> > statement, of the error.
> > 
> > 1. Use gdb (arm-wince-cegcc-gdb). Have it run your application, and see
> > where it traps a signal.
> > 
> > 2. If you're using one of my more recent binary distributions then you
> >   may have support for trapping exceptions. Undocumented ;-)
> > 
> >   Use regeditce or so on your PDA to define
> > HKEY_CURRENT_USER -> cegcc -> debug
> >   and give it the string value "dialog"
> > 
> >   If you have one of my recent distributions (and for now only in cegcc)
> >   then the application will pop up a dialog describing the problem,
> >   instead of just crashing silently.
> > 
> >   Beware, this is/was experimental code. I believe I have it stable now
> >   but the 0.14 or 0.15 may have hickups.
> > 
> > Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-19 Thread Danny Backx
On Mon, 2007-06-18 at 20:16 -0600, Ximsce wrote:
> I don't get any int return warnings, the only output from compilation is:
> 
> Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import)
> 
> which has something to do with multi-threading, I believe.

Actually this is a harmless linker message. The message itself has
nothing to do with multithreading, it can come for other symbols too.

This symbol happens to be MT-related though, that's the consequence of
some default compiler options. See src/mingw/crtmt.c, whose whole source
I've copied below.

Bottom line: nothing to worry about.

Danny

/*
 * crtmt.c
 *
 * This object file defines _CRT_MT to have a value of 1, which will
 * turn on MT support in GCC runtime. This is only linked in when
 * you specify -mthreads when linking with gcc. The Mingw support
 * library, libmingw32.a, contains the complement, crtst.o, which
 * sets this variable to 0. 
 *
 * Mumit Khan  <[EMAIL PROTECTED]>
 *
 */

int _CRT_MT = 1;

-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


[Cegcc-devel] CeGCC 0.50 has been released

2007-06-19 Thread Danny Backx
We've just released CeGCC 0.50 - the first stable release of the CeGCC
tool family :
- arm-wince-mingw32ce-* tools (recommended)
- arm-wince-cegcc-* tools (includes unix-like layer)

Note that all the RPM files are created on a Mandriva Linux system. They
probably work on other distributions, this note is for informational
purposes (and because the new release script apparently failed to name
the files properly).

Go get it at
   http://sourceforge.net/project/showfiles.php?group_id=173455

Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-19 Thread Carsten Sørensen
On 19/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> We've just released CeGCC 0.50 - the first stable release of the CeGCC
> tool family :
> - arm-wince-mingw32ce-* tools (recommended)
> - arm-wince-cegcc-* tools (includes unix-like layer)

(sorry about the triple post Danny)

Great! I'd like to make good on my offer to build binaries for OSX,
has this release been tagged in SVN? Or just a revision number to
build from would be fine.

I have to idea how to get the resulting files to you though, it's
2x100 MB (one package for x86 and one for PowerPC, each package
contains both cegcc and mingw32ce)

Regards,
Carsten Sorensen

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


Re: [Cegcc-devel] CeGCC 0.50 has been released

2007-06-19 Thread Danny Backx
On Tue, 2007-06-19 at 22:57 +0200, Carsten Sørensen wrote:
> On 19/06/07, Danny Backx <[EMAIL PROTECTED]> wrote:
> > We've just released CeGCC 0.50 - the first stable release of the CeGCC
> > tool family :
> > - arm-wince-mingw32ce-* tools (recommended)
> > - arm-wince-cegcc-* tools (includes unix-like layer)
> 
> (sorry about the triple post Danny)
> 
> Great! I'd like to make good on my offer to build binaries for OSX,
> has this release been tagged in SVN? Or just a revision number to
> build from would be fine.

It is a tag in SVN :

dannypc: {206} svn info cegcc-0.50/
Path: cegcc-0.50
URL: https://svn.sourceforge.net/svnroot/cegcc/tags/cegcc-0.50
...

> I have to idea how to get the resulting files to you though, it's
> 2x100 MB (one package for x86 and one for PowerPC, each package
> contains both cegcc and mingw32ce)

No need to get them to me, you can upload to sourceforge and then Pedro
or I can move them from the upload area to the download area.

Basically all you need to do is
ftp upload.sf.net
cd /incoming
put your-file
bye

and convince Pedro or myself to pick up your-file quickly enough before
it gets deleted. (/incoming is temporary storage)

Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


signature.asc
Description: This is a digitally signed message part
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel


Re: [Cegcc-devel] force stdio from newlib/cegcc.dll

2007-06-19 Thread Ximsce


Pedro Alves wrote:
> Please don't top post.

Oops, sorry.  I have limited experience posting to mailing lists like 
this one, so
my apologies for poor etiquette.

> Ximsce wrote:
>> I don't get any int return warnings, the only output from compilation is:
>>
>> Info: resolving _CRT_MT by linking to __imp__CRT_MT (auto-import)
>>
>> which has something to do with multi-threading, I believe.
> 
> OK, this is normal.
> 
> Below is
>> almost the exact code that worked yesterday morning (I unfortunately
>> don't have an exact copy of the code that worked), before I started to
>> complicate things.  If I comment out the execv(), everything else works.
>>   I have tested the lame.exe by itself, and it works, too.  I am
>> compiling with arm-wince-cegcc-gcc and then copying to Windows Mobile 5.
>>
>>char *args[3];
>>args[0] = LAME_EXECUTABLE;
>>args[1] = TEST_WAV_FILE;
>>args[2] = TEST_MP3_OUT;
>>
>>execv(LAME_EXECUTABLE, args);
>>
> 
> You didn't NULL terminate the argument list:
> http://www.opengroup.org/onlinepubs/95399/functions/exec.html
> 
> "The argument argv is an array of character pointers to
> null-terminated strings. The application shall ensure that the last
> member of this array is a null pointer. These strings shall constitute
> the argument list available to the new process image. The value in
> argv[0] should point to a filename that is associated with the process
> being started by one of the exec functions."
> 
> Try this:
> 
>char *args[4];
>args[0] = LAME_EXECUTABLE;
>args[1] = TEST_WAV_FILE;
>args[2] = TEST_MP3_OUT;
>args[3] = NULL;
> 
>execv(LAME_EXECUTABLE, args);
> 
> Cheers,
> Pedro Alves
> 

Right, that was a slight typo on my part.  I've added the NULL 
termination, now the
program sort of works.  When I run it the first time, the log file gets 
created, but
execution appears to still fail on the execv().  If I run the program a 
second time,
then the execv() appears to run (the file encoded by lame appears), but 
then the log
file is locked and not written too, as well as the exe for my 
application, and the pop
up dialog signaling completion never shows.  Needless to say, strange 
behavior.  I am going
to try exception handling again, maybe that will turn up something.

Thanks,
Matt

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel