Issue 174 in libnfc: error: conflicting types for 'uint8_t', 'uint16_t'

32 views
Skip to first unread message

lib...@googlecode.com

unread,
Oct 17, 2011, 8:16:58 AM10/17/11
to nfc-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 174 by vishnu...@gmail.com: error: conflicting types
for 'uint8_t', 'uint16_t'
http://code.google.com/p/libnfc/issues/detail?id=174

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.


lib...@googlecode.com

unread,
Oct 17, 2011, 9:27:54 AM10/17/11
to nfc-...@googlegroups.com
Updates:
Status: Feedback
Owner: rco...@il4p.fr

Comment #1 on issue 174 by rco...@il4p.fr: error: conflicting types

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...

lib...@googlecode.com

unread,
Oct 17, 2011, 9:48:03 AM10/17/11
to nfc-...@googlegroups.com

Comment #2 on issue 174 by vishnu...@gmail.com: error: conflicting types

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

Attachments:
libnfclog 10.5 KB

lib...@googlecode.com

unread,
Oct 17, 2011, 9:52:08 AM10/17/11
to nfc-...@googlegroups.com

Comment #4 on issue 174 by vishnu...@gmail.com: error: conflicting types

hi,

I am attaching the spec file also

thank you

Attachments:
libnfc.spec 710 bytes

lib...@googlecode.com

unread,
Oct 17, 2011, 9:56:10 AM10/17/11
to nfc-...@googlegroups.com

Comment #3 on issue 174 by vishnu...@gmail.com: error: conflicting types

hi,

I am attaching the spec file also

lib...@googlecode.com

unread,
Oct 17, 2011, 1:05:08 PM10/17/11
to nfc-...@googlegroups.com

Comment #5 on issue 174 by rco...@il4p.fr: error: conflicting types

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...

lib...@googlecode.com

unread,
Oct 17, 2011, 1:41:45 PM10/17/11
to nfc-...@googlegroups.com

Comment #6 on issue 174 by vishnu...@gmail.com: error: conflicting types

hi,

sure. lwill give tha feedback

regards

vishnu

lib...@googlecode.com

unread,
Oct 18, 2011, 1:06:56 AM10/18/11
to nfc-...@googlegroups.com

Comment #7 on issue 174 by vishnu...@gmail.com: error: conflicting types

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


Attachments:
libnfclog 10.7 KB

lib...@googlecode.com

unread,
Oct 18, 2011, 4:44:06 AM10/18/11
to nfc-...@googlegroups.com

Comment #8 on issue 174 by yob...@gmail.com: error: conflicting types

.../arm-none-linux-gnueabi/arm-none-linux-gnueabi/sysroot/usr/include/stdint.h:49:

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?


lib...@googlecode.com

unread,
Oct 18, 2011, 6:11:57 AM10/18/11
to nfc-...@googlegroups.com

Comment #9 on issue 174 by vishnu...@gmail.com: error: conflicting types

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

Attachments:
stdint.h 8.3 KB

lib...@googlecode.com

unread,
Oct 18, 2011, 6:16:03 AM10/18/11
to nfc-...@googlegroups.com

Comment #10 on issue 174 by vishnu...@gmail.com: error: conflicting types

am attaching the types.h also

Attachments:
types.h 6.6 KB

lib...@googlecode.com

unread,
Oct 18, 2011, 7:11:29 AM10/18/11
to nfc-...@googlegroups.com

Comment #11 on issue 174 by rco...@il4p.fr: error: conflicting types

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 :)

lib...@googlecode.com

unread,
Oct 18, 2011, 7:18:31 AM10/18/11
to nfc-...@googlegroups.com

Comment #12 on issue 174 by yob...@gmail.com: error: conflicting types

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 :)

lib...@googlecode.com

unread,
Oct 18, 2011, 8:23:12 AM10/18/11
to nfc-...@googlegroups.com

Comment #13 on issue 174 by vishnu...@gmail.com: error: conflicting types

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


lib...@googlecode.com

unread,
Oct 18, 2011, 8:54:27 AM10/18/11
to nfc-...@googlegroups.com
Updates:
Status: Fixed

Comment #14 on issue 174 by rco...@il4p.fr: error: conflicting types

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

lib...@googlecode.com

unread,
Oct 18, 2011, 9:02:31 AM10/18/11
to nfc-...@googlegroups.com

Comment #15 on issue 174 by vishnu...@gmail.com: error: conflicting types

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

lib...@googlecode.com

unread,
Oct 18, 2011, 10:31:01 AM10/18/11
to nfc-...@googlegroups.com

Comment #16 on issue 174 by vishnu...@gmail.com: error: conflicting types

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

lib...@googlecode.com

unread,
Oct 18, 2011, 10:52:51 AM10/18/11
to nfc-...@googlegroups.com

Comment #17 on issue 174 by rco...@il4p.fr: error: conflicting types

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.

Reply all
Reply to author
Forward
0 new messages