Skip to contentSkip to conversation

package/i2c-tools: bump to version 4.0

PATCH Superseded Angelo Compagnucci 2 participants 4 messages Dec 11, 2017 – Dec 13, 2017

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 package/i2c-tools: bump to version 4.0

This patch bumps i2c-tools to version 4.0 and adds a couple of new commands named i2ctransfer and eeprog.
It adds also several upstream commits not included in the release that fix static compilation issues and parallel build issues.

---
 ...01-lib-Module.mk-Add-missing-dependencies.patch | 34 ++++++++++++
 ...efile-Add-flag-to-disable-dynamic-library.patch | 64 ++++++++++++++++++++++
 ...odule.mk-Drop-unused-variable-LIB_OBJECTS.patch | 33 +++++++++++
 .../0004-lib-Module.mk-fixing-LIB_LINKS.patch      | 32 +++++++++++
 package/i2c-tools/i2c-tools.hash                   |  2 +-
 package/i2c-tools/i2c-tools.mk                     | 16 +++++-
 6 files changed, 177 insertions(+), 4 deletions(-)
 create mode 100644 package/i2c-tools/0001-lib-Module.mk-Add-missing-dependencies.patch
 create mode 100644 package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
 create mode 100644 package/i2c-tools/0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch
 create mode 100644 package/i2c-tools/0004-lib-Module.mk-fixing-LIB_LINKS.patch
package/i2c-tools/0001-lib-Module.mk-Add-missing-dependencies.patch new file +34 -0
new file mode 100644
index 0000000..09a78da
@@ -0,0 +1,34 @@
+From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001
+From: Jean Delvare <[email protected]>
+Date: Wed, 6 Dec 2017 09:55:04 +0100
+Subject: [PATCH] lib/Module.mk: Add missing dependencies
+
+The lib symlinks lacked a dependency to the actual library file, so
+parallel builds could run into a race and break.
+
+Signed-off-by: Angelo Compagnucci <[email protected]>
+---
+ lib/Module.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 432a051..fd2c8c4 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -42,11 +42,11 @@ endif
+ $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o
+ 	$(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc
+ 
+-$(LIB_DIR)/$(LIB_SHSONAME):
++$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ 	$(RM) $@
+ 	$(LN) $(LIB_SHLIBNAME) $@
+ 
+-$(LIB_DIR)/$(LIB_SHBASENAME):
++$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME)
+ 	$(RM) $@
+ 	$(LN) $(LIB_SHLIBNAME) $@
+ 
+-- 
+2.7.4
+
package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch new file +64 -0

64 lines not on this page · raw message

package/i2c-tools/0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch new file +33 -0
new file mode 100644
index 0000000..190224a
@@ -0,0 +1,33 @@
+From 1831b618fbedf0bcf15b0465981d133d9e3c53ee Mon Sep 17 00:00:00 2001
+From: Jean Delvare <[email protected]>
+Date: Wed, 6 Dec 2017 10:46:56 +0100
+Subject: [PATCH] lib/Module.mk: Drop unused variable LIB_OBJECTS
+
+Signed-off-by: Angelo Compagnucci <[email protected]>
+---
+ lib/Module.mk | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 44fa938..8a58f5b 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -28,7 +28,6 @@ LIB_SHLIBNAME	:= $(LIB_SHBASENAME).$(LIB_VER)
+ LIB_STLIBNAME	:= libi2c.a
+ 
+ LIB_LINKS	:= $(LIB_SHSONAME) $(LIB_SHBASENAME)
+-LIB_OBJECTS	:= smbus.o
+ 
+ LIB_TARGETS	:=
+ ifeq ($(BUILD_DYNAMIC_LIB),1)
+@@ -36,7 +35,6 @@ LIB_TARGETS	+= $(LIB_SHLIBNAME)
+ endif
+ ifeq ($(BUILD_STATIC_LIB),1)
+ LIB_TARGETS	+= $(LIB_STLIBNAME)
+-LIB_OBJECTS	+= smbus.ao
+ endif
+ 
+ #
+-- 
+2.7.4
+
package/i2c-tools/0004-lib-Module.mk-fixing-LIB_LINKS.patch new file +32 -0
new file mode 100644
index 0000000..7afe705
@@ -0,0 +1,32 @@
+From 026c0eb29059630b0c9133314e44eec8aca12c16 Mon Sep 17 00:00:00 2001
+From: Angelo Compagnucci <[email protected]>
+Date: Mon, 11 Dec 2017 17:57:47 +0100
+Subject: [PATCH] i2c-tools: lib/Module.mk: fixing LIB_LINKS
+
+LIB_LINKS should be added as a dependency only when
+BUILD_DYNAMIC_LIB is enabled
+
+Signed-off-by: Angelo Compagnucci <[email protected]>
+---
+ lib/Module.mk | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/lib/Module.mk b/lib/Module.mk
+index 8a58f5b..de189a2 100644
+--- a/lib/Module.mk
++++ b/lib/Module.mk
+@@ -27,10 +27,9 @@ LIB_SHSONAME	:= $(LIB_SHBASENAME).$(LIB_MAINVER)
+ LIB_SHLIBNAME	:= $(LIB_SHBASENAME).$(LIB_VER)
+ LIB_STLIBNAME	:= libi2c.a
+ 
+-LIB_LINKS	:= $(LIB_SHSONAME) $(LIB_SHBASENAME)
+-
+ LIB_TARGETS	:=
+ ifeq ($(BUILD_DYNAMIC_LIB),1)
++LIB_LINKS	:= $(LIB_SHSONAME) $(LIB_SHBASENAME)
+ LIB_TARGETS	+= $(LIB_SHLIBNAME)
+ endif
+ ifeq ($(BUILD_STATIC_LIB),1)
+-- 
+2.7.4
+
package/i2c-tools/i2c-tools.hash +1 -1
index 464219d..3475d20 100644
@@ -1,5 +1,5 @@
 # Locally computed
-sha256 6d6079153cd49a62d4addacef4c092db1a46ba60b2807070a3fbe050262aef87  i2c-tools-3.1.2.tar.xz
+sha256 d900ca1c11c51ea20caa50b096f948008b8a7ad832311b23353e21baa7af28d6  i2c-tools-4.0.tar.xz
 
 # License file
 sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6  COPYING
package/i2c-tools/i2c-tools.mk +13 -3
index 3bbaf38..0f71fd4 100644
@@ -4,11 +4,12 @@
 #
 ################################################################################
 
-I2C_TOOLS_VERSION = 3.1.2
+I2C_TOOLS_VERSION = 4.0
 I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.xz
 I2C_TOOLS_SITE = https://www.kernel.org/pub/software/utils/i2c-tools
 I2C_TOOLS_LICENSE = GPL-2.0+, GPL-2.0 (py-smbus)
 I2C_TOOLS_LICENSE_FILES = COPYING
+I2C_TOOLS_MAKE_OPTS = EXTRA=eeprog
 
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 I2C_TOOLS_DEPENDENCIES += python
@@ -22,6 +23,14 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 I2C_TOOLS_DEPENDENCIES += busybox
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+I2C_TOOLS_MAKE_OPTS += BUILD_DYNAMIC_LIB=0 USE_STATIC_LIB=1
+endif
+
+ifeq ($(BR2_SHARED_LIBS),y)
+I2C_TOOLS_MAKE_OPTS += BUILD_STATIC_LIB=0
+endif
+
 # Build/install steps mirror the distutil python package type in the python package
 # infrastructure
 ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
@@ -47,15 +56,16 @@ endef
 endif # BR2_PACKAGE_PYTHON
 
 define I2C_TOOLS_BUILD_CMDS
-	$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(MAKE) $(TARGET_CONFIGURE_OPTS) $(I2C_TOOLS_MAKE_OPTS) -C $(@D)
 	$(I2C_TOOLS_BUILD_PYSMBUS)
 endef
 
 define I2C_TOOLS_INSTALL_TARGET_CMDS
-	for i in i2cdump i2cget i2cset i2cdetect; \
+	for i in i2cdump i2cget i2cset i2cdetect i2ctransfer; \
 	do \
 		$(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/sbin/$$i; \
 	done
+	$(INSTALL) -m 755 -D $(@D)/eeprog/eeprog $(TARGET_DIR)/usr/bin/eeprog;
 	$(I2C_TOOLS_INSTALL_PYSMBUS)
 endef
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH v4 1/1 package/i2c-tools: bump to version 4.0

Hello,

Quoted 6 lines · Angelo Compagnucci

This patch bumps i2c-tools to version 4.0 and adds a couple of new commands named i2ctransfer and eeprog.
It adds also several upstream commits not included in the release that fix static compilation issues and parallel build issues.

Quoted 12 lines
---
 ...01-lib-Module.mk-Add-missing-dependencies.patch | 34 ++++++++++++
 ...efile-Add-flag-to-disable-dynamic-library.patch | 64 ++++++++++++++++++++++
 ...odule.mk-Drop-unused-variable-LIB_OBJECTS.patch | 33 +++++++++++
 .../0004-lib-Module.mk-fixing-LIB_LINKS.patch      | 32 +++++++++++
 package/i2c-tools/i2c-tools.hash                   |  2 +-
 package/i2c-tools/i2c-tools.mk                     | 16 +++++-
 6 files changed, 177 insertions(+), 4 deletions(-)
 create mode 100644 package/i2c-tools/0001-lib-Module.mk-Add-missing-dependencies.patch
 create mode 100644 package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
 create mode 100644 package/i2c-tools/0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch
 create mode 100644 package/i2c-tools/0004-lib-Module.mk-fixing-LIB_LINKS.patch

I'm sorry, but this still doesn't build:

Quoted 1 line
Quoted 1 line
Quoted 1 line

i2c-tools 4.0 Extracting

xzcat /home/thomas/dl/i2c-tools-4.0.tar.xz | tar --strip-components=1 -C /home/thomas/projets/buildroot/output/build/i2c-tools-4.0 -xf -

Quoted 1 line
Quoted 1 line
Quoted 1 line

i2c-tools 4.0 Patching

Applying 0001-lib-Module.mk-Add-missing-dependencies.patch using patch:
patching file lib/Module.mk

Applying 0002-Makefile-Add-flag-to-disable-dynamic-library.patch using patch:
patching file Makefile
patching file lib/Module.mk

Applying 0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch using patch:
patching file lib/Module.mk

Applying 0004-lib-Module.mk-fixing-LIB_LINKS.patch using patch:
patching file lib/Module.mk

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

i2c-tools 4.0 Configuring
i2c-tools 4.0 Building

/usr/bin/make -j5 ....
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -fpic -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c lib/smbus.c -o lib/smbus.o

/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cdetect.c -o tools/i2cdetect.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cbusses.c -o tools/i2cbusses.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cdump.c -o tools/i2cdump.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/util.c -o tools/util.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cset.c -o tools/i2cset.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cget.c -o tools/i2cget.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2ctransfer.c -o tools/i2ctransfer.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Iinclude -c eeprog/eeprog.c -o eeprog/eeprog.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Iinclude -c eeprog/24cXX.c -o eeprog/24cXX.o

/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -shared -Wl,--version-script=lib/libi2c.map -Wl,-soname,libi2c.so.0 -o lib/libi2c.so.0.1.0 lib/smbus.o -lc /home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -o tools/i2cdetect tools/i2cdetect.o tools/i2cbusses.o -Llib -li2c /home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -o tools/i2cdump tools/i2cdump.o tools/i2cbusses.o tools/util.o -Llib -li2c /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -li2c
collect2: error: ld returned 1 exit status
make[2]: *** [tools/Module.mk:28: tools/i2cdetect] Error 1
make[2]: *** Waiting for unfinished jobs.... /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -li2c
collect2: error: ld returned 1 exit status
make[2]: *** [tools/Module.mk:31: tools/i2cdump] Error 1
make[1]: *** [package/pkg-generic.mk:250: /home/thomas/projets/buildroot/output/build/i2c-tools-4.0/.stamp_built] Error 2
make: *** [Makefile:79: _all] Error 2

defconfig used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_I2C_TOOLS=y
# BR2_TARGET_ROOTFS_TAR is not set

Perhaps it's time to convince the i2c-tools maintainer to switch to a reasonable build system, rather than providing a hand-written Makefile that doesn't work ?

Best regards,

Thomas

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

PATCH v4 1/1 package/i2c-tools: bump to version 4.0

Dear Thomas,

Quoted 53 lines · Thomas Petazzoni

Hello,

Quoted 6 lines · Angelo Compagnucci

This patch bumps i2c-tools to version 4.0 and adds a couple of new commands named i2ctransfer and eeprog.
It adds also several upstream commits not included in the release that fix static compilation issues and parallel build issues.

Quoted 12 lines
---
 ...01-lib-Module.mk-Add-missing-dependencies.patch | 34 ++++++++++++
 ...efile-Add-flag-to-disable-dynamic-library.patch | 64 ++++++++++++++++++++++
 ...odule.mk-Drop-unused-variable-LIB_OBJECTS.patch | 33 +++++++++++
 .../0004-lib-Module.mk-fixing-LIB_LINKS.patch      | 32 +++++++++++
 package/i2c-tools/i2c-tools.hash                   |  2 +-
 package/i2c-tools/i2c-tools.mk                     | 16 +++++-
 6 files changed, 177 insertions(+), 4 deletions(-)
 create mode 100644 package/i2c-tools/0001-lib-Module.mk-Add-missing-dependencies.patch
 create mode 100644 package/i2c-tools/0002-Makefile-Add-flag-to-disable-dynamic-library.patch
 create mode 100644 package/i2c-tools/0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch
 create mode 100644 package/i2c-tools/0004-lib-Module.mk-fixing-LIB_LINKS.patch

I'm sorry, but this still doesn't build:

Quoted 1 line
Quoted 1 line
Quoted 1 line

i2c-tools 4.0 Extracting

xzcat /home/thomas/dl/i2c-tools-4.0.tar.xz | tar --strip-components=1 -C /home/thomas/projets/buildroot/output/build/i2c-tools-4.0 -xf -

Quoted 1 line
Quoted 1 line
Quoted 1 line

i2c-tools 4.0 Patching

Applying 0001-lib-Module.mk-Add-missing-dependencies.patch using patch:
patching file lib/Module.mk

Applying 0002-Makefile-Add-flag-to-disable-dynamic-library.patch using patch:
patching file Makefile
patching file lib/Module.mk

Applying 0003-lib-Module.mk-Drop-unused-variable-LIB_OBJECTS.patch using patch:
patching file lib/Module.mk

Applying 0004-lib-Module.mk-fixing-LIB_LINKS.patch using patch:
patching file lib/Module.mk

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

i2c-tools 4.0 Configuring
i2c-tools 4.0 Building

/usr/bin/make -j5 ....
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -fpic -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c lib/smbus.c -o lib/smbus.o

/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cdetect.c -o tools/i2cdetect.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cbusses.c -o tools/i2cbusses.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cdump.c -o tools/i2cdump.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/util.c -o tools/util.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cset.c -o tools/i2cset.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2cget.c -o tools/i2cget.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wnested-externs -Winline -W -Wundef -Wmissing-prototypes -Iinclude -c tools/i2ctransfer.c -o tools/i2ctransfer.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Iinclude -c eeprog/eeprog.c -o eeprog/eeprog.o
/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os  -Iinclude -c eeprog/24cXX.c -o eeprog/24cXX.o
Quoted 12 lines

/home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -shared -Wl,--version-script=lib/libi2c.map -Wl,-soname,libi2c.so.0 -o lib/libi2c.so.0.1.0 lib/smbus.o -lc /home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -o tools/i2cdetect tools/i2cdetect.o tools/i2cbusses.o -Llib -li2c /home/thomas/projets/buildroot/output/host/bin/arm-linux-gcc -o tools/i2cdump tools/i2cdump.o tools/i2cbusses.o tools/util.o -Llib -li2c /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -li2c
collect2: error: ld returned 1 exit status
make[2]: *** [tools/Module.mk:28: tools/i2cdetect] Error 1
make[2]: *** Waiting for unfinished jobs.... /home/thomas/projets/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.9.4/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: cannot find -li2c
collect2: error: ld returned 1 exit status
make[2]: *** [tools/Module.mk:31: tools/i2cdump] Error 1
make[1]: *** [package/pkg-generic.mk:250: /home/thomas/projets/buildroot/output/build/i2c-tools-4.0/.stamp_built] Error 2
make: *** [Makefile:79: _all] Error 2

Ouch ...

Quoted 19 lines

defconfig used:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2017.11-rc1.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_I2C_TOOLS=y
# BR2_TARGET_ROOTFS_TAR is not set

Quoted 3 lines

Perhaps it's time to convince the i2c-tools maintainer to switch to a reasonable build system, rather than providing a hand-written Makefile that doesn't work ?

Mmm, sounds rasoneable. Suggestions?

Thanks!

Quoted 8 lines

Best regards,

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

#3 lore raw

PATCH v4 1/1 package/i2c-tools: bump to version 4.0

Hello,

Quoted 5 lines · Angelo Compagnucci
Quoted 3 lines

Perhaps it's time to convince the i2c-tools maintainer to switch to a reasonable build system, rather than providing a hand-written Makefile that doesn't work ?

Mmm, sounds rasoneable. Suggestions?

Well, you will have to discuss this with the i2c-tools maintainer, he might have some preference. (Though I'm sure his preference will be to keep his non-working hand-written Makefile, but I'd be happy to be proven wrong on this).

Obvious choices are autotools or CMake. meson is becoming popular too. At least doing an autotools based build system should be relatively easy.

Best regards,

Thomas

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