|
|
Subject: Re: some remarks on svn tree and my testing with gcc-4.1.2 - msg#00027
List: multimedia.gphoto.devel
kilgota@xxxxxxxxxxxxxxxxxxxxxx wrote:
> 1. I found out that I have to compile as root; apparently some permissions
> were wrong, which did not show up until I did "make install" and it bailed
> out. The problems were all of those symlinks from over in /usr/share/
See with your distro. no problem here.
>
>
> 2. It works even though I did not yet re-do gphoto2. That is, gphoto2
> compiled with gcc-3.4.6 still works with newly-compiled libgphoto2 done
> with gcc-4.1.2.
gcc 4 is ABI compatible with 3.4
Not necessarily the case for g++.
Still nothing to see.
> 4. I don't know if it is gcc-4.1.2 which is doing this, or if it is a more
> pedantic setting about reporting errors. But signedness warnings are now
> rife in the output. They may not do harm, but they are all over the place
> and come up during the compilation of practically every camera driver, as
> far as I could tell without exception (I did not check closely but they
> were all over the place, really). These plentiful error messages seem
> to derive from the fact that many of the basic gphoto functions such as
> gp_file_set_data_and_size()
> gp_file_append()
> gp_port_usb_msg_read()
> gp_port_usb_msg_write()
We know. Yes gcc 4.1 is more pedantic.
We have been using it for several month now.
#include <std_slackware_rant.h>
> and so on tend to use "int" and "char" instead of "unsigned int" and
> "unsigned char" whereas in many places where such functions are used, the
> code is set up for the unsigned versions of these variables. I do not know
> if this is in any way crucial, but it really does show up now, whereas it
> previously did not.
Signedess is know to produce the strangest bug. I think that Marcus
started fixing several of the bugs warnings.
Hub
-------------------------------------------------------------------------
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/
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
some remarks on svn tree and my testing with gcc-4.1.2
First,
Today's current svn tree for libgphoto2 seems to compile and run OK with
gcc-4.1.2. I recently had a lot of trouble upgrading to slackware-current
from slackware-11.0. The move to gcc-4.x was one of the big changes, and
the other big one, which caused much more trouble to me, was the migration
from X version 6.9 to 7.1. Thus, I am relieved that I did not have
additional problems when trying out gcc-4.1.
That said, here are some other relevant experiences:
1. I found out that I have to compile as root; apparently some permissions
were wrong, which did not show up until I did "make install" and it bailed
out. The problems were all of those symlinks from over in /usr/share/
2. It works even though I did not yet re-do gphoto2. That is, gphoto2
compiled with gcc-3.4.6 still works with newly-compiled libgphoto2 done
with gcc-4.1.2.
3. A rather amusing thing happened when I did gphoto2 -n --debug 2>debug,
with an old SQ905 camera. The log says
0.007036 gphoto2-port-usb(2): inep to look for is 129
and sure enough in libgphoto2_port/usb/libusb.c one finds
gp_log (GP_LOG_DEBUG, "gphoto2-port-usb"
, "inep to look for is %d", port->settings.usb.inep);
I could have done that but if I had and I caught it, I would change %d to
something else. Either 0x%x or just %x.
4. I don't know if it is gcc-4.1.2 which is doing this, or if it is a more
pedantic setting about reporting errors. But signedness warnings are now
rife in the output. They may not do harm, but they are all over the place
and come up during the compilation of practically every camera driver, as
far as I could tell without exception (I did not check closely but they
were all over the place, really). These plentiful error messages seem
to derive from the fact that many of the basic gphoto functions such as
gp_file_set_data_and_size()
gp_file_append()
gp_port_usb_msg_read()
gp_port_usb_msg_write()
and so on tend to use "int" and "char" instead of "unsigned int" and
"unsigned char" whereas in many places where such functions are used, the
code is set up for the unsigned versions of these variables. I do not know
if this is in any way crucial, but it really does show up now, whereas it
previously did not.
Theodore Kilgore
-------------------------------------------------------------------------
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/
Next Message by Date:
click to view message preview
Re: some remarks on svn tree and my testing with gcc-4.1.2
> 3. A rather amusing thing happened when I did gphoto2 -n --debug 2>debug,
> with an old SQ905 camera. The log says
>
> 0.007036 gphoto2-port-usb(2): inep to look for is 129
>
> and sure enough in libgphoto2_port/usb/libusb.c one finds
>
> gp_log (GP_LOG_DEBUG, "gphoto2-port-usb"
> , "inep to look for is %d", port->settings.usb.inep);
>
> I could have done that but if I had and I caught it, I would change %d to
> something else. Either 0x%x or just %x.
I fixed this to use %02x.
Ciao, Marcus
-------------------------------------------------------------------------
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/
Previous Message by Thread:
click to view message preview
some remarks on svn tree and my testing with gcc-4.1.2
First,
Today's current svn tree for libgphoto2 seems to compile and run OK with
gcc-4.1.2. I recently had a lot of trouble upgrading to slackware-current
from slackware-11.0. The move to gcc-4.x was one of the big changes, and
the other big one, which caused much more trouble to me, was the migration
from X version 6.9 to 7.1. Thus, I am relieved that I did not have
additional problems when trying out gcc-4.1.
That said, here are some other relevant experiences:
1. I found out that I have to compile as root; apparently some permissions
were wrong, which did not show up until I did "make install" and it bailed
out. The problems were all of those symlinks from over in /usr/share/
2. It works even though I did not yet re-do gphoto2. That is, gphoto2
compiled with gcc-3.4.6 still works with newly-compiled libgphoto2 done
with gcc-4.1.2.
3. A rather amusing thing happened when I did gphoto2 -n --debug 2>debug,
with an old SQ905 camera. The log says
0.007036 gphoto2-port-usb(2): inep to look for is 129
and sure enough in libgphoto2_port/usb/libusb.c one finds
gp_log (GP_LOG_DEBUG, "gphoto2-port-usb"
, "inep to look for is %d", port->settings.usb.inep);
I could have done that but if I had and I caught it, I would change %d to
something else. Either 0x%x or just %x.
4. I don't know if it is gcc-4.1.2 which is doing this, or if it is a more
pedantic setting about reporting errors. But signedness warnings are now
rife in the output. They may not do harm, but they are all over the place
and come up during the compilation of practically every camera driver, as
far as I could tell without exception (I did not check closely but they
were all over the place, really). These plentiful error messages seem
to derive from the fact that many of the basic gphoto functions such as
gp_file_set_data_and_size()
gp_file_append()
gp_port_usb_msg_read()
gp_port_usb_msg_write()
and so on tend to use "int" and "char" instead of "unsigned int" and
"unsigned char" whereas in many places where such functions are used, the
code is set up for the unsigned versions of these variables. I do not know
if this is in any way crucial, but it really does show up now, whereas it
previously did not.
Theodore Kilgore
-------------------------------------------------------------------------
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/
Next Message by Thread:
click to view message preview
Re: some remarks on svn tree and my testing with gcc-4.1.2
On Wed, Jun 13, 2007 at 12:27:15AM -0400, Hubert Figuiere wrote:
> > and so on tend to use "int" and "char" instead of "unsigned int" and
> > "unsigned char" whereas in many places where such functions are used, the
> > code is set up for the unsigned versions of these variables. I do not know
> > if this is in any way crucial, but it really does show up now, whereas it
> > previously did not.
>
> Signedess is know to produce the strangest bug. I think that Marcus
> started fixing several of the bugs warnings.
The signedness issues are mostly that, just warnings.
You can just ignore them for now.
It is sometimes hard to have consistent char* vs unsigned char* in libgphoto2.
Ciao, Marcus
-------------------------------------------------------------------------
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/
|
|