Skip to content

First Impressions circa 2018 #1

Description

@jspraul

Build 32bit on 64 bit Linux using an automake configure script?

sudo apt-get install gcc-multilib g++-multilib
./configure --host=i686-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"

error: 'INT32_MAX' was not declared in this scope
Add #define __STDC_LIMIT_MACROS before first #include in dumpfloppy.cpp

Activity

  1. johnkw commented on Mar 14, 2018

    @johnkw
    Owner

    You're cross-compiling dumpfloppy? Patches welcome, but don't break the normal build.

  2. jspraul commented on Mar 14, 2018

    @jspraul
    Author

    The normal build breaks on 64-bit machines (which is pretty normal these days), unless the flags listed above are passed to the ./configure step (forcing a 32-bit build). Because it breaks so obviously, I prefer the 32-bit build rather than hoping everything else is properly 64-bit-ized.

    show.cpp: In function ‘void show_track(const track_t&, FILE*)’:
    show.cpp:58:49: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘size_t {aka long unsigned int}’ [-Werror=format]
    show.cpp: In function ‘void show_track_data(const track_t&, FILE*)’:
    show.cpp:74:74: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘std::map<std::basic_string<unsigned char>, unsigned int>::size_type {aka long unsigned int}’ [-Werror=format]
    

    After switching to a 32-bit build, the UINT32_MAX error occurs with gcc 4.6.3 (C++11 -ish or something).

    dumpfloppy.cpp: In function ‘bool read_track(track_t&, bool)’:
    dumpfloppy.cpp:438:41: error: ‘UINT32_MAX’ was not declared in this scope
    dumpfloppy.cpp:451:114: error: ‘UINT32_MAX’ was not declared in this scope
    

    I was able to compile and run the utility without any other issues. I hadn't seen any activity on this project for 4 years so I only included the fix details rather than all the error details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions