pstdint.h compile error on FreeBSD 9.0 64-bit

Bug #1131231 reported by eyousey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Brewtarget
Fix Released
Medium
Mik Firestone

Bug Description

Previous versions (1.2.4 & 1.2.5) would compile without error. Version 2.0.0 will not compile when using the instructions in the README located in the source code. Compile progresses until it reaches the output below.

System info
uname -a
FreeBSD XXXX 9.0-RELEASE-p4 FreeBSD 9.0-RELEASE-p4 #0: Tue Sep 4 20:50:06 EDT 2012 amd64

I get the following errors.

[ 42%] Building CXX object src/CMakeFiles/brewtarget.dir/Algorithms.cpp.o
[ 43%] Building CXX object src/CMakeFiles/brewtarget.dir/BeerXMLElement.cpp.o
In file included from /root/brewtarget-2.0.0/src/BeerXMLElement.h:35,
                 from /root/brewtarget-2.0.0/src/BeerXMLElement.cpp:19:
/root/brewtarget-2.0.0/src/pstdint.h:397: error: conflicting declaration 'typedef long long int int64_t'
/usr/include/sys/_stdint.h:49: error: 'int64_t' has a previous declaration as 'typedef __int64_t int64_t'
/root/brewtarget-2.0.0/src/pstdint.h:492: error: conflicting declaration 'typedef long long unsigned int uint64_t'
/usr/include/sys/_stdint.h:69: error: 'uint64_t' has a previous declaration as 'typedef __uint64_t uint64_t'
/root/brewtarget-2.0.0/src/pstdint.h:652: error: conflicting declaration 'typedef signed char int_fast8_t'
/usr/include/stdint.h:48: error: 'int_fast8_t' has a previous declaration as 'typedef __int_fast8_t int_fast8_t'
/root/brewtarget-2.0.0/src/pstdint.h:653: error: conflicting declaration 'typedef unsigned char uint_fast8_t'
/usr/include/stdint.h:53: error: 'uint_fast8_t' has a previous declaration as 'typedef __uint_fast8_t uint_fast8_t'
/root/brewtarget-2.0.0/src/pstdint.h:654: error: conflicting declaration 'typedef short int int_fast16_t'
/usr/include/stdint.h:49: error: 'int_fast16_t' has a previous declaration as 'typedef __int_fast16_t int_fast16_t'
/root/brewtarget-2.0.0/src/pstdint.h:655: error: conflicting declaration 'typedef short unsigned int uint_fast16_t'
/usr/include/stdint.h:54: error: 'uint_fast16_t' has a previous declaration as 'typedef __uint_fast16_t uint_fast16_t'
*** Error code 1

Stop in /root/brewtarget-2.0.0/build.
*** Error code 1

Stop in /root/brewtarget-2.0.0/build.
*** Error code 1

Stop in /root/brewtarget-2.0.0/build.

Revision history for this message
Mik Firestone (mikfire) wrote :

Yup. We need to #ifdef some declarations to take into account FreeBSD. I have been sitting on this patch for a while, waiting for the v2.0.0 release before adding it in. I will get this taken care of.

Changed in brewtarget:
assignee: nobody → Mik Firestone (mikfire)
importance: Undecided → Medium
Revision history for this message
Mik Firestone (mikfire) wrote :

Merge request 21.

If you want, use git to clone my branch, checkout the bugs/freebsd_build branch and build or you can copy the src/pstdint.h into the head branch and build there. Either way should get around the compiler errors.

Changed in brewtarget:
status: New → Fix Committed
Revision history for this message
eyousey (eyousey) wrote :

I got your bugs/freebsd_build branch from git. Ran the configure script, cd build, and ran make. It ran up to the same point as before, but then stopped. Here is the error message I got.

Scanning dependencies of target brewtarget
[ 42%] Building CXX object src/CMakeFiles/brewtarget.dir/Algorithms.cpp.o
[ 43%] Building CXX object src/CMakeFiles/brewtarget.dir/BeerXMLElement.cpp.o
In file included from /root/git/mikfires-brewtarget/src/BeerXMLElement.h:35,
                 from /root/git/mikfires-brewtarget/src/BeerXMLElement.cpp:19:
/root/git/mikfires-brewtarget/src/pstdint.h:397: error: conflicting declaration 'typedef long long int int64_t'
/usr/include/sys/_stdint.h:49: error: 'int64_t' has a previous declaration as 'typedef __int64_t int64_t'
/root/git/mikfires-brewtarget/src/pstdint.h:492: error: conflicting declaration 'typedef long long unsigned int uint64_t'
/usr/include/sys/_stdint.h:69: error: 'uint64_t' has a previous declaration as 'typedef __uint64_t uint64_t'
*** Error code 1

Stop in /root/git/mikfires-brewtarget/build.
*** Error code 1

Stop in /root/git/mikfires-brewtarget/build.
*** Error code 1

Stop in /root/git/mikfires-brewtarget/build.

Revision history for this message
eyousey (eyousey) wrote :

Saw that the version has been bumped to 2.0.1. So I grabbed the latest main branch (3/6/2013) from git and tried to compile. I'm still getting similar errors as to what is in my previous post. I also grabbed the orig.tar.gz source code file and tried the same with it, but got the same errors as what you see below.

Before re-running the configure script after the git update, I did a make clean on the build directory.

Thanks.

[ 42%] Building CXX object src/CMakeFiles/brewtarget.dir/Algorithms.cpp.o
[ 43%] Building CXX object src/CMakeFiles/brewtarget.dir/BeerXMLElement.cpp.o
In file included from /root/git/brewtarget/src/BeerXMLElement.h:35,
                 from /root/git/brewtarget/src/BeerXMLElement.cpp:19:
/root/git/brewtarget/src/pstdint.h:839:7: warning: no newline at end of file
In file included from /root/git/brewtarget/src/BeerXMLElement.h:35,
                 from /root/git/brewtarget/src/BeerXMLElement.cpp:19:
/root/git/brewtarget/src/pstdint.h:397: error: conflicting declaration 'typedef long long int int64_t'
/usr/include/sys/_stdint.h:49: error: 'int64_t' has a previous declaration as 'typedef __int64_t int64_t'
/root/git/brewtarget/src/pstdint.h:492: error: conflicting declaration 'typedef long long unsigned int uint64_t'
/usr/include/sys/_stdint.h:69: error: 'uint64_t' has a previous declaration as 'typedef __uint64_t uint64_t'
/root/git/brewtarget/src/pstdint.h:652: error: conflicting declaration 'typedef signed char int_fast8_t'
/usr/include/stdint.h:48: error: 'int_fast8_t' has a previous declaration as 'typedef __int_fast8_t int_fast8_t'
/root/git/brewtarget/src/pstdint.h:653: error: conflicting declaration 'typedef unsigned char uint_fast8_t'
/usr/include/stdint.h:53: error: 'uint_fast8_t' has a previous declaration as 'typedef __uint_fast8_t uint_fast8_t'
/root/git/brewtarget/src/pstdint.h:654: error: conflicting declaration 'typedef short int int_fast16_t'
/usr/include/stdint.h:49: error: 'int_fast16_t' has a previous declaration as 'typedef __int_fast16_t int_fast16_t'
/root/git/brewtarget/src/pstdint.h:655: error: conflicting declaration 'typedef short unsigned int uint_fast16_t'
/usr/include/stdint.h:54: error: 'uint_fast16_t' has a previous declaration as 'typedef __uint_fast16_t uint_fast16_t'
*** Error code 1

Stop in /root/git/brewtarget/build.
*** Error code 1

Stop in /root/git/brewtarget/build.
*** Error code 1

Stop in /root/git/brewtarget/build.

Philip (rocketman768)
Changed in brewtarget:
milestone: none → 2.0.2
Philip (rocketman768)
summary: - Compile error on FreeBSD 9.0 64-bit
+ pstdint.h compile error on FreeBSD 9.0 64-bit
Philip (rocketman768)
Changed in brewtarget:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.