Skip to contentSkip to conversation

package/gauche: remove unnecessary files for target, fix a typo

PATCH New Hiroshi Kawashima 4 participants 20 messages Nov 10, 2015 – Dec 24, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

---

package/gauche/gauche.mk +17 -2
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ################################################################################
 
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche
 GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.*
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED
+
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima

#1 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Hiroshi,

Quoted 1 line · Hiroshi Kawashima

Thanks for this patch. Also, I think you should have a look at the autobuilder failures for gauche, it fails to build in a number of situations. See:

http://autobuild.buildroot.org/?reason=gauche-0.9.4

Some cases are due to unsupported architecture (example: xtensa), some cases are due to the external libatomic_ops being built before gauche, and therefore used by gauche instead of its internal copy, causing some build failures, etc.

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 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Thomas.

Quoted 11 lines

2015/11/10 18:48?Thomas Petazzoni <[email protected]> ?????

Hiroshi,

Quoted 1 line · Hiroshi Kawashima

Thanks for this patch. Also, I think you should have a look at the autobuilder failures for gauche, it fails to build in a number of situations. See:

Quoted 7 lines

http://autobuild.buildroot.org/?reason=gauche-0.9.4

Some cases are due to unsupported architecture (example: xtensa), some cases are due to the external libatomic_ops being built before gauche, and therefore used by gauche instead of its internal copy, causing some build failures, etc.

Sure.
Most problems seems to be architectures that boehm gc not ported. Would you suggest how can I control these case in Config.in ? (eg. gauche is not supported on xtensa, disable selecting gauche package for xtensa architecture).

Regards,
Kawashima

Quoted 7 lines

Best regards,

Thomas

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

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Hiroshi,

Quoted 1 line · Hiroshi Kawashima

Most problems seems to be architectures that boehm gc not ported.

Indeed. First thing would be to see if gauche can used an external boehm gc implementation rather than its own. Indeed, we already have a package for boehm gc in package/bdwgc/.

And this package is only built for architectures where libatomic_ops is available.

Quoted 3 lines

Would you suggest how can I control these case in Config.in ? (eg. gauche is not supported on xtensa, disable selecting gauche package for xtensa architecture).

If you can use the bdwgc package, then please do so, and you will have to add in gauche/Config.in "depends on BR2_PACKAGE_LIBATOMIC_ARCH_SUPPORTS" which should make most of the architecture specific problems disappear.

If you cannot use the bdwgc package, then just add some architecture dependencies in gauche/Config.in, probably in the form of:

config BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

	bool
	default y if BR2_arm || BR2_i386 || ...

config BR2_PACKAGE_GAUCHE
bool "gauche"
depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

comment "gauche needs ..."
depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

Best regards,

Thomas

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

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Thomas.

Quoted 6 lines

2015/11/10 19:42?Thomas Petazzoni <[email protected]> ?????

Hiroshi,

On Tue, 10 Nov 2015 19:21:26 +0900, Hiroshi Kawashima wrote:

Quoted 8 lines
Quoted 1 line

Most problems seems to be architectures that boehm gc not ported.

Indeed. First thing would be to see if gauche can used an external boehm gc implementation rather than its own. Indeed, we already have a package for boehm gc in package/bdwgc/.

And this package is only built for architectures where libatomic_ops is available.

I didn?t note buildroot already have external boehm gc package. Ok, I will try, thank you.

As last resort, I will limit architecture to be built as you indicated.

Regards,
Kawashima

#5 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Thomas Petazzoni

Dear Thomas.

I checked latest 25 fails of

    http://autobuild.buildroot.org/?reason=gauche-0.9.4

Summary is tail of this e-mail.

I looked at tree of gauche, but it will not so easy to use external (existing in buildroot) bdwgc, so I'd like to exclude architectures not supported by current boehm gc as first.

I know this is not long term solution, but to classify further cause, it will be useful.
If you agree, I will send patch for this.

Regards, Kawashima

2015-11-11 12:36:54	xtensa		gc not ported
2015-11-10 23:30:21	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 23:11:45	arc		gc not ported
2015-11-10 22:20:21	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 17:30:19	arc		gc not ported
2015-11-10 14:16:58	sh4		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 08:46:51	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 04:28:00	arm		./libgauche-0.9.so: undefined reference to `AO_pt_lock'
2015-11-10 03:44:37	xtensa		gc not ported
2015-11-10 01:17:44	microblazeel	gc not ported
2015-11-10 00:37:46	arm		./libgauche-0.9.so: undefined reference to `AO_pt_lock'
2015-11-10 00:00:05	arm		./include/private/../gc_pthread_redirects.h:37:22: fatal error: dlfcn.h: No such file or directory
2015-11-09 16:40:33	xtensa		gc not ported
2015-11-09 16:24:36	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-09 14:43:12	arc		gc not ported
2015-11-09 10:43:50	arc		gc not ported
2015-11-09 07:08:04	xtensa		gc not ported
2015-11-09 05:14:36	arm		./libgauche-0.9.so: undefined reference to `AO_pt_lock'
2015-11-09 01:00:08	microbazeel	gc not ported
2015-11-08 20:14:57	arm		./libgauche-0.9.so: undefined reference to `AO_pt_lock'
2015-11-08 15:41:57	arm		./include/private/../gc_pthread_redirects.h:37:22: fatal error: dlfcn.h: No such file or directory
2015-11-08 07:18:05	xtensa		gc not ported
2015-11-08 06:41:22	arc		gc not ported
2015-11-08 05:34:02	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-07 02:03:42	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'

...

Quoted 11 lines

If you cannot use the bdwgc package, then just add some architecture dependencies in gauche/Config.in, probably in the form of:

config BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

	bool
	default y if BR2_arm || BR2_i386 || ...

config BR2_PACKAGE_GAUCHE
bool "gauche"
depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

Quoted 6 lines

comment "gauche needs ..."
depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS

Best regards,

Thomas

============================================================
Hiroshi Kawashima

#6 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Hiroshi,

Quoted 1 line · Hiroshi Kawashima
2015-11-11 12:36:54	xtensa		gc not ported

Right, exclude this architecture.

Quoted 1 line
2015-11-10 23:30:21	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'

This probably only happens with certain C libraries only. Check if this build failure occurs with uClibc or glibc, probably only with uClibc.

Quoted 1 line
2015-11-10 23:11:45	arc		gc not ported

Right, exclude this architecture as well.

Quoted 5 lines
2015-11-10 22:20:21	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 17:30:19	arc		gc not ported
2015-11-10 14:16:58	sh4		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 08:46:51	powerpc		./libgauche-0.9.so: undefined reference to `getcontext'
2015-11-10 04:28:00	arm		./libgauche-0.9.so: undefined reference to `AO_pt_lock'

This is what happens when libatomic_ops is built before gauche. In this case, gauche tries to use the external libatomic_ops instead of its internal one.

As I already suggested to fix this, you have two options:

(1) Understand why using the external libatomic_ops doesn't work and fix it.

(2) Pass a configure option to gauche to force it to use its internal version of libatomic_ops.

I'd prefer (1), but we can live with (2) if (1) is too complicated.

Quoted 1 line
2015-11-10 00:00:05	arm		./include/private/../gc_pthread_redirects.h:37:22: fatal error: dlfcn.h: No such file or directory

Two options here:

(1) boehm gc in gauche supports the GC_NO_DLOPEN like the official boehm gc. In this case, pass -DGC_NO_DLOPEN when BR2_STATIC_LIBS=y. See bdwgc.mk for an example.

(2) Make gauche depend on !BR2_STATIC_LIBS.

Thanks,

Thomas

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

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Thomas.

Thank you for your comment.

I will post 3 patches for each fix later soon.
Last one 'fatal error: dlfcn.h: No such file or directory' is not covered yet, but most failure will be disappeared.

Regards,
Kawashima

Quoted 51 lines · Thomas Petazzoni

Hiroshi,

Quoted 1 line · Hiroshi Kawashima
2015-11-11 12:36:54	xtensa		gc not ported

Right, exclude this architecture.

Quoted 1 line
2015-11-10 23:30:21	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

This probably only happens with certain C libraries only. Check if this build failure occurs with uClibc or glibc, probably only with uClibc.

Quoted 1 line
2015-11-10 23:11:45	arc		gc not ported

Right, exclude this architecture as well.

Quoted 1 line
2015-11-10 22:20:21	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 2 lines
2015-11-10 17:30:19	arc		gc not ported
2015-11-10 14:16:58	sh4		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 1 line
2015-11-10 08:46:51	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 1 line
2015-11-10 04:28:00	arm		./libgauche-0.9.so: undefined reference

to `AO_pt_lock'

This is what happens when libatomic_ops is built before gauche. In this case, gauche tries to use the external libatomic_ops instead of its internal one.

As I already suggested to fix this, you have two options:

(1) Understand why using the external libatomic_ops doesn't work and fix it.

(2) Pass a configure option to gauche to force it to use its internal version of libatomic_ops.

I'd prefer (1), but we can live with (2) if (1) is too complicated.

Quoted 1 line
2015-11-10 00:00:05	arm		./include/private/../gc_pthread_redirec

ts.h:37:22: fatal error: dlfcn.h: No such file or directory

Two options here:

(1) boehm gc in gauche supports the GC_NO_DLOPEN like the official boehm gc. In this case, pass -DGC_NO_DLOPEN when BR2_STATIC_LIBS=y. See bdwgc.mk for an example.

Quoted 5 lines

(2) Make gauche depend on !BR2_STATIC_LIBS.

Thanks,

Thomas

============================================================
Hiroshi Kawashima

#8 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Thomas Petazzoni

Dear Thomas.
Thank you for your comment.

I sent 3 patches to fix these.
Please pullup them.

Raplied inline.

Thomas Petazzoni writes:
...

Quoted 3 lines
Quoted 1 line
2015-11-11 12:36:54	xtensa		gc not ported

Right, exclude this architecture.

Done.

Quoted 5 lines
Quoted 1 line
2015-11-10 23:30:21	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

This probably only happens with certain C libraries only. Check if this build failure occurs with uClibc or glibc, probably only with uClibc.

Yes, it happen on uClibc, so I incorporated patch for this from bdwgc package.

Quoted 3 lines
Quoted 1 line
2015-11-10 23:11:45	arc		gc not ported

Right, exclude this architecture as well.

Done.

Quoted 16 lines
Quoted 1 line
2015-11-10 22:20:21	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 2 lines
2015-11-10 17:30:19	arc		gc not ported
2015-11-10 14:16:58	sh4		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 1 line
2015-11-10 08:46:51	powerpc		./libgauche-0.9.so: undefined reference

to `getcontext'

Quoted 1 line
2015-11-10 04:28:00	arm		./libgauche-0.9.so: undefined reference

to `AO_pt_lock'

This is what happens when libatomic_ops is built before gauche. In this case, gauche tries to use the external libatomic_ops instead of its internal one.

As I already suggested to fix this, you have two options:

Quoted 7 lines

(1) Understand why using the external libatomic_ops doesn't work and fix it.

(2) Pass a configure option to gauche to force it to use its internal version of libatomic_ops.

I'd prefer (1), but we can live with (2) if (1) is too complicated.

I choose (2) for now, patch posted.

Quoted 10 lines
Quoted 1 line
2015-11-10 00:00:05	arm		./include/private/../gc_pthread_redirec

ts.h:37:22: fatal error: dlfcn.h: No such file or directory

Two options here:

(1) boehm gc in gauche supports the GC_NO_DLOPEN like the official boehm gc. In this case, pass -DGC_NO_DLOPEN when BR2_STATIC_LIBS=y. See bdwgc.mk for an example.

(2) Make gauche depend on !BR2_STATIC_LIBS.

Patch for this not sent yet.
After 3 patches are pullup, I will send for this.

Regards,
Kawashima
============================================================
Hiroshi Kawashima

#9 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Thomas Petazzoni

Dear Thomas.

I have sent patch for this just now.
Please apply.

Regards,
Kawashima

Thomas Petazzoni writes:
...

Quoted 10 lines
Quoted 1 line
2015-11-10 00:00:05	arm		./include/private/../gc_pthread_redirec

ts.h:37:22: fatal error: dlfcn.h: No such file or directory

Two options here:

(1) boehm gc in gauche supports the GC_NO_DLOPEN like the official boehm gc. In this case, pass -DGC_NO_DLOPEN when BR2_STATIC_LIBS=y. See bdwgc.mk for an example.

(2) Make gauche depend on !BR2_STATIC_LIBS.

============================================================
Hiroshi Kawashima

#10 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Hiroshi Kawashima

Hi Hiroshi,

The subject line is a bit long, you could make it:

package/gauche: remove unnecessary files for target

While we're at it, also fix a typo.

Quoted 27 lines · Hiroshi Kawashima

---

package/gauche/gauche.mk +4 -2
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ################################################################################
 
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche
 GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED

package/gauche/gauche.mk endif · line 42

Quoted 10 lines
package/gauche/gauche.mk +10 -0
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.*
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include

This cleanup is quite complicated and I wonder if it is really worth it. For
space, the impact is really small compared to the 3MB of libs and .scm files installed by the package. Even the ones in /usr/bin I'm not sure if it's worth to remove them.

Thomas, what do you think?

Regards,
Arnout

Quoted 12 lines
package/gauche/gauche.mk +3 -0
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED
+
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#11 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Arnout, Hiroshi,

Quoted 17 lines · Arnout Vandecappelle

package/gauche/gauche.mk endif · line 42

Quoted 11 lines
package/gauche/gauche.mk +11 -0
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.*
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include

This cleanup is quite complicated and I wonder if it is really worth it. For
space, the impact is really small compared to the 3MB of libs and .scm files installed by the package. Even the ones in /usr/bin I'm not sure if it's worth to remove them.

Quoted 1 line

Thomas, what do you think?

I also think it is quite noisy, at least the way it is written. However I like to have on the target only what's needed.

Hiroshi, do we really need to be so fine-grained when removing things?

Maybe we could do:

GAUCHE_FILES_TO_CLEANUP = \
	$(foreach p,gauche-config gauche-install gauche-package,\
		bin/$(p) lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$(p)) \
	$(foreach p,gencomp genstub precomp,\
		share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$(p)) \
	share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4 \
	share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.* \
	lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include

And then use that variable:

	$(foreach p,$(GAUCHE_FILES_TO_CLEANUP),\
		$(RM) -rf $(TARGET_DIR)/usr/$(p)$(sep))

But it's not significantly better :/

Thomas

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

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Thomas.

Thank you for your suggestion.
As you are maintainer, I will obey your opinion anyway.

But both approach is same 10 lines.
Just my preference is direct approach will have good readability if same size.

Regards,
Kawashima

Quoted 57 lines

2015/11/11 22:59?Thomas Petazzoni <[email protected]> ?????

Arnout, Hiroshi,

Quoted 17 lines · Arnout Vandecappelle

package/gauche/gauche.mk endif · line 42

Quoted 11 lines
package/gauche/gauche.mk +11 -0
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.*
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include

This cleanup is quite complicated and I wonder if it is really worth it. For space, the impact is really small compared to the 3MB of libs and .scm files installed by the package. Even the ones in /usr/bin I'm not sure if it's worth to remove them.

Quoted 1 line

Thomas, what do you think?

I also think it is quite noisy, at least the way it is written. However I like to have on the target only what's needed.

Hiroshi, do we really need to be so fine-grained when removing things?

Maybe we could do:

GAUCHE_FILES_TO_CLEANUP = \
	$(foreach p,gauche-config gauche-install gauche-package,\
		bin/$(p) lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$(p)) \
	$(foreach p,gencomp genstub precomp,\
		share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$(p)) \
	share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4 \
	share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.* \
	lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include

And then use that variable:

	$(foreach p,$(GAUCHE_FILES_TO_CLEANUP),\
		$(RM) -rf $(TARGET_DIR)/usr/$(p)$(sep))

But it's not significantly better :/

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#13 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Quoted 7 lines · Hiroshi Kawashima

Dear Thomas.

Thank you for your suggestion.
As you are maintainer, I will obey your opinion anyway.

But both approach is same 10 lines.
Just my preference is direct approach will have good readability if same size.

I agree that your approach is better readable. I personally like make
constructs but shell is for most people clearer.

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#14 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Arnout.

Thank you!

Quoted 26 lines

2015/11/11 23:29?Arnout Vandecappelle <[email protected]> ?????

Quoted 7 lines · Hiroshi Kawashima

Dear Thomas.

Thank you for your suggestion.
As you are maintainer, I will obey your opinion anyway.

But both approach is same 10 lines.
Just my preference is direct approach will have good readability if same size.

I agree that your approach is better readable. I personally like make constructs but shell is for most people clearer.

Regards,
Arnout

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#15 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Hiroshi Kawashima

Dear maintenaer, Thomas.

So if no further objection, please pull up this.

Regards,
Kawashima

Quoted 43 lines · Hiroshi Kawashima

---

package/gauche/gauche.mk +2 -1
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ############################################################################
 ####
 
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche

GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)

package/gauche/gauche.mk +10 -1
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GA
 UCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(
 GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/aclocal.m4

package/gauche/gauche.mk +1 -0
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/template.*

package/gauche/gauche.mk +1 -0
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VE

RSION)/include

package/gauche/gauche.mk endif · line 47

Quoted 5 lines
package/gauche/gauche.mk +3 -0
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED
+
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima

#16 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Hiroshi Kawashima

Dear maintainer.

Could you pullup this before 2015.11 official release ? I think discussion for this patch is already done.

https://patchwork.ozlabs.org/patch/542211/

Quoted 43 lines · Hiroshi Kawashima

---

package/gauche/gauche.mk +2 -1
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ############################################################################
 ####
 
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche

GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)

package/gauche/gauche.mk +10 -1
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GA
 UCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(
 GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/aclocal.m4

package/gauche/gauche.mk +1 -0
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/template.*

package/gauche/gauche.mk +1 -0
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VE

RSION)/include

package/gauche/gauche.mk endif · line 47

Quoted 5 lines
package/gauche/gauche.mk +3 -0
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED
+
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima

#17 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Hiroshi Kawashima

Hiroshi, All,

On 2015-11-10 18:22 +0900, Hiroshi Kawashima spake thusly:

Quoted 29 lines

---

package/gauche/gauche.mk +6 -2
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ################################################################################
 
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche
 GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \

package/gauche/gauche.mk endif · line 44

Quoted 10 lines
package/gauche/gauche.mk +10 -0
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/lib/$$i ; \
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/aclocal.m4
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/template.*
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VERSION)/include
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED

There's been some discussion around that patch, sorry for chiming in so late...

Rather than remove what is not wanted, why not just install what is required? If the number of actions to install is smaller than what we try to remove, then maybe it is better.

What's your opinon? Do you think that it's achievable?

Regards,
Yann E. MORIN.

Quoted 8 lines
package/gauche/gauche.mk +0 -0
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#18 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

Dear Yann.

Thank you for your comment.

Building of gauche is based on autotools, so installation process is embedded in it. I think this (in my patch) method will be more straightforward and comprehensive way rather than tweeking configure.ac or something like that.
What do you think ?

Regards,
Kawashima

Quoted 52 lines · Yann E. MORIN

Hiroshi, All,

On 2015-11-10 18:22 +0900, Hiroshi Kawashima spake thusly:

package/gauche/gauche.mk line 5

Quoted 9 lines

---

package/gauche/gauche.mk +0 -0
index b887c6a..8406774 100644
@@ -4,7 +4,8 @@
 #
 ##########################################################################

######

Quoted 11 lines
package/gauche/gauche.mk +2 -1
-GAUCHE_VERSION = 0.9.4
+GAUCHE_VERSION_MAJOR = 0.9
+GAUCHE_VERSION = $(GAUCHE_VERSION_MAJOR).4
 GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz
 GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche
 GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm)
@@ -23,10 +24,24 @@ endif
 # Detection of c99 support in configure fails without WCHAR. To enable
 # automatic detection of c99 support by configure, we need to enable
 # WCHAR in toolchain. But actually we do not need WCHAR at gauche

package/gauche/gauche.mk endif · line 35

Quoted 10 lines
package/gauche/gauche.mk +5 -1
-# runtime. So reuesting WCHAR in toolchain just for automatic detection
+# runtime. So requesting WCHAR in toolchain just for automatic detection
 # will be overkill. To solve this, explicitly -std=gnu99 is specified
 # here.
 GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99"
 
+define GAUCHE_REMOVE_UNNEEDED
+	for i in gauche-config gauche-install gauche-package ; do \
+		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
+		rm -f $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GA

UCHE_VERSION)/$(GNU_TARGET_NAME)/$$i ; \

package/gauche/gauche.mk endif

Quoted 3 lines
package/gauche/gauche.mk +3 -0
+	done
+	for i in gencomp genstub precomp ; do \
+		rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(

GAUCHE_VERSION)/lib/$$i ; \

package/gauche/gauche.mk endif · line 40

Quoted 2 lines
package/gauche/gauche.mk +2 -0
+	done
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/aclocal.m4

package/gauche/gauche.mk endif · line 41

Quoted 1 line
package/gauche/gauche.mk +1 -0
+	rm -f $(TARGET_DIR)/usr/share/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_V

ERSION)/template.*

package/gauche/gauche.mk endif · line 42

Quoted 1 line
package/gauche/gauche.mk +1 -0
+	rm -fr $(TARGET_DIR)/usr/lib/gauche-$(GAUCHE_VERSION_MAJOR)/$(GAUCHE_VE

RSION)/include

package/gauche/gauche.mk endif · line 44

Quoted 2 lines
package/gauche/gauche.mk +2 -0
+endef
+GAUCHE_POST_INSTALL_TARGET_HOOKS += GAUCHE_REMOVE_UNNEEDED

There's been some discussion around that patch, sorry for chiming in so late...

Quoted 11 lines

Rather than remove what is not wanted, why not just install what is required? If the number of actions to install is smaller than what we try to remove, then maybe it is better.

What's your opinon? Do you think that it's achievable?

Regards,
Yann E. MORIN.

Quoted 2 lines
package/gauche/gauche.mk +0 -0
 $(eval $(host-autotools-package))
 $(eval $(autotools-package))

============================================================
Hiroshi Kawashima

#19 lore raw

PATCH 1/1 package/gauche: remove unnecessary files for target, fix a typo

In reply to Hiroshi Kawashima

Dear Hiroshi Kawashima,

Quoted 1 line · Hiroshi Kawashima

After much discussion, I believe that the general consensus is that this patch adds too much code/complexity for a not so important benefit. So I've marked your patch as Rejected in our patch tracking system.

Best regards,

Thomas

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