Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find uint8_t #36

Open
samv opened this issue Aug 28, 2024 · 0 comments
Open

Can't find uint8_t #36

samv opened this issue Aug 28, 2024 · 0 comments

Comments

@samv
Copy link

samv commented Aug 28, 2024

I'm seeing this issue building this on my system:

$ make all
./linux/GitVersion.sh > linux/Version.h
++ which git
+ GIT=/bin/git
+ '[' x/bin/git == x ']'
++ git describe --dirty
+ GITVER=1.16.0-24-g4522b3e
+ echo '#define GIT_VERSION ' '"1.16.0-24-g4522b3e"'
make  all-am
make[1]: Entering directory '/home/samv/src/sedutil'
depbase=`echo Common/DtaOptions.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.    -Wall -Werror -std=c++11 -I./Common -I./Common/pbkdf2 -I./linux -I./LinuxPBA -g -O2 -MT Common/DtaOptions.o -MD -MP -MF $depbase.Tpo -c -o Common/DtaOptions.o Common/DtaOptions.cpp &&\
mv -f $depbase.Tpo $depbase.Po
g++ -Wall -Werror -std=c++11 -I./Common -I./Common/pbkdf2 -I./linux -I./LinuxPBA -g -O2   -o sedutil-cli Common/sedutil.o Common/DtaOptions.o LinuxPBA/GetPassPhrase.o linux/DtaDevLinuxNvme.o linux/DtaDevLinuxSata.o linux/DtaDevOS.o linux/DtaDevLinuxDrive.o Common/DtaAnnotatedDump.o Common/DtaCommand.o Common/DtaDev.o Common/DtaDevEnterprise.o Common/DtaDevGeneric.o Common/DtaDevOpal1.o Common/DtaDevOpal2.o Common/DtaDevOpal.o Common/DtaDiskType.o Common/DtaHashPwd.o Common/DtaHexDump.o Common/DtaResponse.o Common/DtaSession.o Common/pbkdf2/blockwise.o Common/pbkdf2/chash.o Common/pbkdf2/hmac.o Common/pbkdf2/pbkdf2.o Common/pbkdf2/sha512.o Common/pbkdf2/sha1.o  
depbase=`echo LinuxPBA/LinuxPBA.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.    -Wall -Werror -std=c++11 -I./Common -I./Common/pbkdf2 -I./linux -I./LinuxPBA -g -O2 -MT LinuxPBA/LinuxPBA.o -MD -MP -MF $depbase.Tpo -c -o LinuxPBA/LinuxPBA.o LinuxPBA/LinuxPBA.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from ./Common/log.h:45,
                 from LinuxPBA/LinuxPBA.cpp:24:
./Common/DtaOptions.h:33:5: error: ‘uint8_t’ does not name a type
   33 |     uint8_t password;   /**< password supplied */
      |     ^~~~~~~
./Common/DtaOptions.h:1:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  +++ |+#include <cstdint>
   ...lines omitted... 
./Common/DtaOptions.h:58:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
make[1]: *** [Makefile:896: LinuxPBA/LinuxPBA.o] Error 1
make[1]: Leaving directory '/home/samv/src/sedutil'
make: *** [Makefile:476: all] Error 2
rm linux/Version.h

Output from running configure: configure-output.txt

The config.log file from configure: config.log

It looks like autoconf even checked for it:

configure:4597: checking for uint8_t
configure:4597: gcc -c -g -O2  conftest.c >&5
configure:4597: $? = 0
configure:4597: result: yes

Adding the recommended include fixes this error. It's also pulled in by stdint.h and stdbit.h, FWIW.

--- a/Common/DtaOptions.h
+++ b/Common/DtaOptions.h
@@ -21,6 +21,8 @@ along with sedutil.  If not, see <http://www.gnu.org/licenses/>.
 #ifndef _DTAOPTIONS_H
 #define	_DTAOPTIONS_H
 
+#include <cstdint>
+
 /** Output modes */
 typedef enum _sedutiloutput {
 	sedutilNormal,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant