Skip to contentSkip to conversation

libtirpc: Fix build error due to missing stdint.h inclusion

PATCH New Dmitrii Kolesnichenko 3 participants 11 messages Jun 15, 2017 – Jun 20, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

It includes stdint.h to provide uintptr_t.

This patch has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

---
 ...ild-error-due-to-missing-stdint.h-include.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch
package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch new file +26 -0
new file mode 100644
index 0000000..ccb0dff
@@ -0,0 +1,26 @@
+Fixes
+| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
+|   if (len < (uintptr_t)xdrs->x_base) {
+|              ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@...>
+---
+Upstream-Status: Pending
+
+ src/xdr_sizeof.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */
+-- 
+2.13.0
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hello,

Quoted 11 lines · Dmitrii Kolesnichenko

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

It includes stdint.h to provide uintptr_t.

This patch has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

Thanks for the contribution. However, could you be more specific about which Buildroot configuration triggers this build failure?

I don't see build failures on libtirpc in our autobuilders
(http://autobuild.buildroot.net/).

package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch line 6

Quoted 12 lines
package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch new file +6 -0
new file mode 100644
index 0000000..ccb0dff
@@ -0,0 +1,26 @@
+Fixes
+| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
+|   if (len < (uintptr_t)xdrs->x_base) {
+|              ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@...>

Please add your Signed-off-by here as well. Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hello Thomas,

Quoted 1 line

Thanks for the contribution. However, could you be more specific about which Buildroot configuration triggers this build failure?

It occurs when I build rootfs for ARC glibc toolchain. When I build uClibc toolchain this failure doesn't occur.

Thanks,

Dmitrii Kolesnichenko

#3 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hello,

Quoted 5 lines · Dmitrii Kolesnichenko
Quoted 2 lines

Thanks for the contribution. However, could you be more specific about which Buildroot configuration triggers this build failure?

It occurs when I build rootfs for ARC glibc toolchain. When I build uClibc toolchain this failure doesn't occur.

That is weird. Why we aren't seeing this with our other glibc toolchains? Is it because you're testing with the latest glibc master, which exhibits this issue?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Thanks for the contribution. However, could you be more specific about which Buildroot configuration triggers this build failure?

It occurs when I build rootfs for ARC glibc toolchain. When I build uClibc toolchain this failure doesn't occur.

That is weird. Why we aren't seeing this with our other glibc toolchains? Is it because you're testing with the latest glibc master, which exhibits this issue?

Yes, you're right. It happens because I'm testing with the latest glibc master. I tried to build rootfs for i386 with the latest glibc master and received the same error.

Thanks,

Dmitrii Kolesnichenko

#5 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

In reply to Thomas Petazzoni

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

It includes stdint.h to provide uintptr_t.

This patch has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

---
 ...ild-error-due-to-missing-stdint.h-include.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch
package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch new file +27 -0
new file mode 100644
index 0000000..ccb0dff
@@ -0,0 +1,27 @@
+Fixes
+| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
+|   if (len < (uintptr_t)xdrs->x_base) {
+|              ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@...>
+Signed-off-by: Dmitrii Kolesnichenko <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/xdr_sizeof.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */
+-- 
+2.13.0
Signature · 1 line
1.8.3.1
#6 lore raw

PATCH 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hello,

Quoted 11 lines · Dmitrii Kolesnichenko

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

It includes stdint.h to provide uintptr_t.

This patch has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

Thanks, but this commit log and patch description still don't explain with which version of glibc you're seeing the problem. Indeed, this error has not been caught by our autobuilders, so one may wonder why this additional patch is needed.

Can you add such an explanation in the commit description?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#7 lore raw

PATCH v3 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

This error occurs with the latest glibc master version, but doesn't occur with version 2.25.

Patch includes stdint.h to provide uintptr_t.

It has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

---
 ...ild-error-due-to-missing-stdint.h-include.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch
package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch new file +27 -0
new file mode 100644
index 0000000..ccb0dff
@@ -0,0 +1,27 @@
+Fixes
+| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
+|   if (len < (uintptr_t)xdrs->x_base) {
+|              ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@...>
+Signed-off-by: Dmitrii Kolesnichenko <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/xdr_sizeof.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */
+-- 
+2.13.0
Signature · 1 line
1.8.3.1
#8 lore raw

PATCH v3 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hi Dmitrii,

Quoted 8 lines · Dmitrii Kolesnichenko

Add patch to fix following error:

Quoted 4 lines

../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'? ? if (len < (uintptr_t)xdrs->x_base) {
?????????????^~~~~~~~~

This error occurs with the latest glibc master version, but doesn't occur with version 2.25.

If we're talking about development branch but not a tag it makes sense to mention commit you're using (in upstream glibc but not any arc-specific). That way people may understand better where were you while seeing that problem.

Quoted 5 lines

Patch includes stdint.h to provide uintptr_t.

It has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/libtirpc-devel/

It worth pointing to a particular message or even better to a commit if it exists. In your case the patch is here?https://sourceforge.net/p/libtirpc/mailman/message/35850276/ And interesting enough there were no replies since the patch was posted a month ago, so I would propose to ping libtirpc maintainer to make sure the patch gets accepted sometime soon.

-Alexey

#9 lore raw

PATCH v4 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

This error occurs with the latest glibc master version (during the testing I had glibc commit 92bd70fb85bce57ac47ba5d8af008736832c955a), but doesn't occur with version 2.25.

Patch includes stdint.h to provide uintptr_t.

It has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/message/35850276/

---
 ...ild-error-due-to-missing-stdint.h-include.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch
package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch new file +27 -0
new file mode 100644
index 0000000..ccb0dff
@@ -0,0 +1,27 @@
+Fixes
+| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
+|   if (len < (uintptr_t)xdrs->x_base) {
+|              ^~~~~~~~~
+
+Signed-off-by: Khem Raj <raj.khem@...>
+Signed-off-by: Dmitrii Kolesnichenko <[email protected]>
+---
+Upstream-Status: Pending
+
+ src/xdr_sizeof.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/xdr_sizeof.c b/src/xdr_sizeof.c
+index d23fbd1..79d6707 100644
+--- a/src/xdr_sizeof.c
++++ b/src/xdr_sizeof.c
+@@ -39,6 +39,7 @@
+ #include <rpc/xdr.h>
+ #include <sys/types.h>
+ #include <stdlib.h>
++#include <stdint.h>
+ #include "un-namespace.h"
+ 
+ /* ARGSUSED */
+-- 
+2.13.0
Signature · 1 line
1.8.3.1
#10 lore raw

PATCH v4 1/1 libtirpc: Fix build error due to missing stdint.h inclusion

Hello,

Quoted 11 lines · Dmitrii Kolesnichenko

Add patch to fix following error:

| ../../libtirpc-1.0.1/src/xdr_sizeof.c:93:13: error: 'uintptr_t' undeclared (first use in this function); did you mean '__intptr_t'?
|   if (len < (uintptr_t)xdrs->x_base) {
|              ^~~~~~~~~

This error occurs with the latest glibc master version (during the testing I had glibc commit 92bd70fb85bce57ac47ba5d8af008736832c955a), but doesn't occur with version 2.25.

Patch includes stdint.h to provide uintptr_t.

Quoted 8 lines

It has been submitted upstream:
https://sourceforge.net/p/libtirpc/mailman/message/35850276/

---
 ...ild-error-due-to-missing-stdint.h-include.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/libtirpc/0008-Fix-build-error-due-to-missing-stdint.h-include.patch

Applied to master, thanks. However, I reformatted the patch using Git, because upstream libtirpc uses git. It would be nice to do so for your next patches to Buildroot packages. Thanks a lot for this contribution!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com