marcus905 / libnfc

Automatically exported from code.google.com/p/libnfc
GNU Lesser General Public License v3.0
0 stars 0 forks source link

error: conflicting types for 'uint8_t', 'uint16_t' #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.compiling libnfc for ltib using scbuild
2.
3.

What is the expected output? What do you see instead?
it should be compiled
error: conflicting types for 'uint8_t', 'uint16_t'

What version of the product are you using? On what operating system?
its libnfc 1.5 with linux and ARM(iMX257)

Please provide any additional information below.

Original issue reported on code.google.com by vishnu...@gmail.com on 17 Oct 2011 at 12:16

GoogleCodeExporter commented 9 years ago
There is not enough information to solve your problem.
Please tell which version of libnfc you use (1.5 does not exist: there is 1.4.2 
or 1.5.0 from tarballs or tell the revision number if you use the development 
version).

Plus, you have to submit a full libnfc's compilation log if you want we can 
help you or at least tell us how to reproduce exactly your problem.

I hope you understand we cant help you with this...

Original comment by romu...@libnfc.org on 17 Oct 2011 at 1:26

GoogleCodeExporter commented 9 years ago
hi,

thank you 

i am using 1.5.0

i will attach the log file
i dont know how it happened. from the starting itself i am getting this error

Original comment by vishnu...@gmail.com on 17 Oct 2011 at 1:47

Attachments:

GoogleCodeExporter commented 9 years ago
hi,

I am attaching the spec file also

thank you

Original comment by vishnu...@gmail.com on 17 Oct 2011 at 1:51

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks for feedback. As I'm not able to reproduce the bug, could you try the 
latest version (made 1 hour ago :) ) and report back the full compilation log 
if failed ?

Thank you!
PS: We will catch it, but the problem sounds really strange...

Original comment by romu...@libnfc.org on 17 Oct 2011 at 5:04

GoogleCodeExporter commented 9 years ago
hi,

sure. lwill give tha feedback

regards 

vishnu

Original comment by vishnu...@gmail.com on 17 Oct 2011 at 5:41

GoogleCodeExporter commented 9 years ago
hi,

i tried with the new version. but i am having the same issue.
I am using arm-none-linux-gnueabi-gcc compiler. my target architecture is ARM. 
and I am using LTIB.

have you ever tried in this platform?

This code works fine with Ubuntu 10.04 PC.

I am attaching the log file

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 5:06

Attachments:

GoogleCodeExporter commented 9 years ago
.../arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/include/stdint.h:4
9: error: conflicting types for 'uint8_t'
.../arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/include/sys/types.
h:202: error: previous declaration of 'uint8_t' was here

Hmm this happens in 2 files from your toolchain.
I don't have that toolchain but I checked in another ARM toolchain I had and 
there, sys/types.h doesn't contain a definition of uint8_t, only of __uint8_t.
Could you upload those 2 files?

Original comment by yob...@gmail.com on 18 Oct 2011 at 8:43

GoogleCodeExporter commented 9 years ago
i will attach those two files.
please go through those. but this same gcc is used for all other applications 
that I compiled for my ARM. but there it was not showing this type of error

i am totally confused. Is the error in the basic C level function

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 10:11

Attachments:

GoogleCodeExporter commented 9 years ago
am attaching the types.h also

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 10:12

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, I may have an idea, it can be related to the defines made in configure 
script that have been placed in r200 as a workaround from compilation problem 
in C99.
Btw, I have removed this workaround and does not produce any compilation 
errors: r1176.
Please give it a try. As I will not made a new (unstable) release with only 
this revision, I will point you how to have the corresponding tarball (follow 
these steps directly on your host):

svn export https://libnfc.googlecode.com/svn/trunk
cd trunk
autoreconf -is
./configure
make dist

Now you will have a new "libnfc-1.5.1.tar.gz" in this directory, use it as 
drop-in replacement for the official one.
Please give us some feedback :)

Original comment by romu...@libnfc.org on 18 Oct 2011 at 11:10

GoogleCodeExporter commented 9 years ago
Indeed this matches the observation that:
stdint.h defines uint8_t
types.h defines u_int8_t
The removed workaround linked u_int8_t=uint8_t

So this should work :)

Original comment by yob...@gmail.com on 18 Oct 2011 at 11:18

GoogleCodeExporter commented 9 years ago
yes i tried the trunk
conflicting types error went. but its showing readline error

/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetnum'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgoto'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetflag'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`BC'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tputs'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`PC'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetent'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`UP'
/media/kdata/imx257/ltib/rootfs/usr/lib//libreadline.so: undefined reference to 
`tgetstr'
collect2: ld returned 1 exit status
make[3]: *** [pn53x-tamashell] Error 1
make[3]: Leaving directory 
`/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1/examples'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/kdata/imx257/ltib/rpm/BUILD/libnfc-1.5.1'
make: *** [all] Error 2
error: Bad exit status from /media/kdata/imx257/ltib/tmp/rpm-tmp.2457 (%build)

RPM build errors:
    Bad exit status from /media/kdata/imx257/ltib/tmp/rpm-tmp.2457 (%build)
Build time for libnfc: 11 seconds

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 12:22

GoogleCodeExporter commented 9 years ago
Ok, so the first problem is solved. I set this issue as fixed and open a new 
one: Issue 175.
Please use the Issue 175 page to continue to comment this new problem.

Note: you will already find two potential solutions about this.

Thanks!

Fixed in r1176

Original comment by romu...@libnfc.org on 18 Oct 2011 at 12:52

GoogleCodeExporter commented 9 years ago
thanks a lot
i am happy that its compiled
with your new code
thanks a lot
i gave --with-readline=no with ./config.
is it needed badly 

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 1:01

GoogleCodeExporter commented 9 years ago
hi when i tried to run libnfc in my PC its not detected. its showing that 
device is not found
i used nfc-list

kserver@kserver:/media/kdata/packages/libnfc-1.5.1$ nfc-list 
nfc-list uses libnfc 1.5.1 (r1175)
No NFC device found.

my pn532_uart driver is enabled and i am using it only. is it possible to give 
the target device file with the command

Original comment by vishnu...@gmail.com on 18 Oct 2011 at 2:30

GoogleCodeExporter commented 9 years ago
UART drivers does not probe for NFC devices except you force it at compile time.

./configure --with-drivers=pn532_uart --enable-serial-autoprobe

BTW, please do not use a unrelated issue to wrote new problem. You could use 
forum and create a new issue.
Thanks.

Original comment by romu...@libnfc.org on 18 Oct 2011 at 2:51