bugCompact Disc Input and Control Library - Bugs: bug #37392, Correct structure packing for...

 
 

bug #37392: Correct structure packing for MinGW32-gcc-4.7.x

Submitted by:  -Deleted Account- <lrn>
Submitted on:  Wed 19 Sep 2012 06:55:24 AM UTC  
 
Category: compilationSeverity: 5 - Average
Item Group: libiso9660Status: Fixed
Privacy: PublicAssigned to: Rocky Bernstein <rocky>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 02 Oct 2012 02:12:30 AM UTC, comment #8:

For now we'll live with the restriction that gcc >= 4.0 needs to be used on MinGW. If it comes up, I can put a test in configure. I have also made note of this in README.libcdio

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 26 Sep 2012 06:22:27 PM UTC, comment #7:

Clarification: it will most likely not compile on W32 with anything older than gcc-4.0. On other platforms it shouldn't be a problem.

Also, if you are not using -mms-bitfields in your CFLAGS, and you gcc is older than 4.7.x, try it.

-Deleted Account- <lrn>
Wed 26 Sep 2012 06:13:29 PM UTC, comment #6:

ok, i've tried 4c5369b, and it seems to be working (i have some failures, but they are probably related to the other bug - something about sense size).

However, i do feel that i should point out that you do not seem to check for gcc version. Which means that this code will most likely not compile on anything older than gcc-4.0

-Deleted Account- <lrn>
Wed 26 Sep 2012 05:40:07 PM UTC, comment #5:

commit 4c5369b is what worked on my systems. If this doesn't work on yours please send a patch off of the current git. Thanks.

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 26 Sep 2012 01:01:11 PM UTC, comment #4:

No, i don't. Revised patch removes that first hunk, now only PRAGMA_BEGIN_PACKED and PRAGMA_END_PACKED are affected. Are you sure you applied the right patch?

Also, i just found a typo in my patch - it checks for _GNUC_MINOR_ twice :-\ First one should be _GNUC_MAJOR_. That said, this bug should not affect you (it practically makes gcc never define these two macros as empty on W32, ever, which is only going to hit you if you have gcc-3.3.6 or older, which you don't).

-Deleted Account- <lrn>
Wed 26 Sep 2012 11:43:02 AM UTC, comment #3:

The revised patch does not work on my Mingw system where I have gcc4 installed. test/driver/nrg.exe gives an assert failed sizeof(buf) == 12 and compiling image/nrg.h reports that the gcc_struct attribute is ignored.

I gather you are taking the gcc_struct definition for GNUC_PACKED?

Rocky Bernstein <rocky>
Project AdministratorIn charge of this item.
Wed 26 Sep 2012 04:46:31 AM UTC, comment #2:

Updated the patch.

(file #26639)

-Deleted Account- <lrn>
Wed 19 Sep 2012 08:10:41 AM UTC, comment #1:

OK, that first hunk (the one that adds gcc_struct) can be removed, it's only necessary for bitfields (libcdio doesn't use bitfields), and has to be used differently (as a structure attribute, not a field attribute).

-Deleted Account- <lrn>
Wed 19 Sep 2012 06:55:24 AM UTC, original submission:

check_sizeof fails on vanilla libcdio ( configured with CFLAGS="-std=iso9899:1999" ./configure --prefix=/mingw --enable-maintainer-mode ):
checking sizeof (msf_t) ...ok!
checking sizeof (iso_volume_descriptor_t) ...ok!
checking sizeof (iso9660_pvd_t) ...failed!
==> sizeof (iso9660_pvd_t) == 2060 (but should be 2048)
checking sizeof (iso_path_table_t) ...failed!
==> sizeof (iso_path_table_t) == 10 (but should be 8)
checking sizeof (iso9660_dir_t) ...failed!
==> sizeof (iso9660_dir_t) == 41 (but should be 33)
checking sizeof (iso9660_xa_t) ...ok!
FAIL: check_sizeof.exe

Attached patch fixes that.

-Deleted Account- <lrn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #26639:  0007-fix-struct-packing-on-latest-v2.mingw32.patch added by lrn (1KiB - text/x-diff - Updated version)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rocky (Posted a comment)
  • -unavailable- added by lrn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Oct 2012 02:12:30 AM UTCrockyStatusNone=>Fixed
      Assigned toNone=>rocky
      Open/ClosedOpen=>Closed
    Wed 26 Sep 2012 04:46:31 AM UTClrnAttached File-=>Added 0007-fix-struct-packing-on-latest-v2.mingw32.patch, #26639
    Wed 19 Sep 2012 06:55:24 AM UTClrnAttached File-=>Added 0007-fix-struct-packing-on-latest.mingw32.patch, #26586

    Back to the top


    Powered by Savane 3.1-cleanup1