Opened 12 years ago

Closed 11 years ago

#239 closed defect/bug (fixed)

uint32_t undefined in binfile.c

Reported by: ssinger_pg@… Owned by: KaZeR
Priority: minor Milestone: version 0.0.5
Component: tools Version: git master
Severity: Keywords:
Cc:

Description (last modified by KaZeR)

I've encountered a compile error when building on powerpc/linux

binfile.c doesn't seem to be picking up the uint32_t typedef needed by endianess.h.

The attached patch to binfile.c fixes the problem

 gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../../navit -DMODULE=data_binfile -g -O2 -Wall -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith -Wreturn-type -D_GNU_SOURCE -ffast-math -MT binfile.lo -MD -MP -MF .deps/binfile.Tpo -c binfile.c  -fPIC -DPIC -o .libs/binfile.o
binfile.c: In function 'lfh_to_cpu':
binfile.c:101: error: 'uint32_t' undeclared (first use in this function)
binfile.c:101: error: (Each undeclared identifier is reported only once
binfile.c:101: error: for each function it appears in.)
binfile.c:101: error: expected ')' before 'bswap_16'
binfile.c:101: error: expected ')' before 'bswap_16'
binfile.c:107: error: expected ')' before 'bswap_16'
binfile.c:107: error: expected ')' before 'bswap_16'
binfile.c:108: error: expected ')' before 'bswap_16'
binfile.c:108: error: expected ')' before 'bswap_16'
binfile.c:109: error: expected ')' before 'bswap_16'
binfile.c:109: error: expected ')' before 'bswap_16'
binfile.c: In function 'cd_to_cpu':
binfile.c:116: error: 'uint32_t' undeclared (first use in this function)
binfile.c:116: error: expected ')' before 'bswap_16'
binfile.c:116: error: expected ')' before 'bswap_16'
binfile.c:117: error: expected ')' before 'bswap_16'
binfile.c:117: error: expected ')' before 'bswap_16'
binfile.c:118: error: expected ')' before 'bswap_16'
binfile.c:118: error: expected ')' before 'bswap_16'
binfile.c:124: error: expected ')' before 'bswap_16'
binfile.c:124: error: expected ')' before 'bswap_16'
binfile.c:125: error: expected ')' before 'bswap_16'
binfile.c:125: error: expected ')' before 'bswap_16'
binfile.c: In function 'eoc_to_cpu':
binfile.c:130: error: 'uint32_t' undeclared (first use in this function)
binfile.c:130: error: expected ')' before 'bswap_16'
binfile.c:130: error: expected ')' before 'bswap_16'
binfile.c:135: error: expected ')' before 'bswap_16'
binfile.c:135: error: expected ')' before 'bswap_16'
binfile.c:136: error: expected ')' before 'bswap_16'
binfile.c:136: error: expected ')' before 'bswap_16'
binfile.c: In function 'binfile_coord_get':
binfile.c:166: error: 'uint32_t' undeclared (first use in this function)
binfile.c:166: error: expected ')' before 'bswap_16'
binfile.c:166: error: expected ')' before 'bswap_16'
binfile.c:167: error: expected ')' before 'bswap_16'
binfile.c:167: error: expected ')' before 'bswap_16'
binfile.c: In function 'binfile_attr_get':
binfile.c:196: error: 'uint32_t' undeclared (first use in this function)
binfile.c:196: error: expected ')' before 'bswap_16'
binfile.c:196: error: expected ')' before 'bswap_16'
binfile.c:197: error: expected ')' before 'bswap_16'
binfile.c:197: error: expected ')' before 'bswap_16'
binfile.c: In function 'setup_pos':
binfile.c:346: error: 'uint32_t' undeclared (first use in this function)
binfile.c:346: error: expected ')' before 'bswap_16'
binfile.c:346: error: expected ')' before 'bswap_16'
binfile.c:355: error: expected ')' before 'bswap_16'
binfile.c:355: error: expected ')' before 'bswap_16'
binfile.c:356: error: expected ')' before 'bswap_16'
binfile.c:356: error: expected ')' before 'bswap_16'
binfile.c: In function 'map_rect_get_item_binfile':

Attachments (2)

binfile.c.diff (362 bytes) - added by ssinger_pg@… 12 years ago.
patch to include stdint.h
configure.in.diff (402 bytes) - added by ssinger_pg@… 12 years ago.
patch to detect/set HAVE_BYTESWAP_H

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by ssinger_pg@…

patch to include stdint.h

comment:1 Changed 12 years ago by ssinger_pg@…

On closer inspection I'm thinking that the real problem might be that the #if HAVE_BYTESWAP_H

block in endianess.h is being used. I don't the macro defined anywhere, maybe the correct fix is to add in a m4 macro to check/define HAVE_BYTESSWAP_H

Changed 12 years ago by ssinger_pg@…

patch to detect/set HAVE_BYTESWAP_H

comment:2 Changed 12 years ago by ssinger_pg@…

Both configure.in.diff and binfile.c.diff are needed to build/run navit on powerpc/Linux.

osm2navit might still have issues on the powerpc but the main application runs

comment:3 Changed 12 years ago by KaZeR

  • Description modified (diff)
  • Milestone set to version 0.0.5
  • Status changed from new to assigned

comment:4 Changed 11 years ago by Ssinger

Fix committed in r1499. This issue can be closed

comment:5 Changed 11 years ago by Tinloaf

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.