* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
@ 2020-08-07 11:37 Michael Fischer
2020-08-07 19:46 ` Yann E. MORIN
0 siblings, 1 reply; 7+ messages in thread
From: Michael Fischer @ 2020-08-07 11:37 UTC (permalink / raw)
To: buildroot
0001-fix-build-with-gcc-10.x.patch: Add patch to fix build with gcc 10.x
Signed-off-by: Michael Fischer <mf@go-sys.de>
---
.../0001-fix-build-with-gcc-10.x.patch | 117 ++++++++++++++++++
1 file changed, 117 insertions(+)
create mode 100644 package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
diff --git a/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
new file mode 100644
index 0000000000..7c7b772894
--- /dev/null
+++ b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
@@ -0,0 +1,117 @@
+Description: This patch fixes the "multiple definition of" errors with gcc10
+
+Signed-off-by: Michael Fischer <mf@go-sys.de>
+
+diff -purN python-rpi-gpio.org/source/common.h python-rpi-gpio/source/common.h
+--- python-rpi-gpio.org/source/common.h 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/common.h 2020-08-07 09:31:33.948575964 +0200
+@@ -30,14 +30,14 @@ SOFTWARE.
+ #define I2C 42
+ #define PWM 43
+
+-int gpio_mode;
+-const int pin_to_gpio_rev1[41];
+-const int pin_to_gpio_rev2[41];
+-const int pin_to_gpio_rev3[41];
+-const int (*pin_to_gpio)[41];
+-int gpio_direction[54];
+-rpi_info rpiinfo;
+-int setup_error;
+-int module_setup;
++extern int gpio_mode;
++extern const int pin_to_gpio_rev1[41];
++extern const int pin_to_gpio_rev2[41];
++extern const int pin_to_gpio_rev3[41];
++extern const int (*pin_to_gpio)[41];
++extern int gpio_direction[54];
++extern rpi_info rpiinfo;
++extern int setup_error;
++extern int module_setup;
+ int check_gpio_priv(void);
+ int get_gpio_number(int channel, unsigned int *gpio);
+diff -purN python-rpi-gpio.org/source/constants.h python-rpi-gpio/source/constants.h
+--- python-rpi-gpio.org/source/constants.h 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/constants.h 2020-08-07 09:32:15.522196618 +0200
+@@ -23,22 +23,22 @@ SOFTWARE.
+ #define PY_PUD_CONST_OFFSET 20
+ #define PY_EVENT_CONST_OFFSET 30
+
+-PyObject *high;
+-PyObject *low;
+-PyObject *input;
+-PyObject *output;
+-PyObject *pwm;
+-PyObject *serial;
+-PyObject *i2c;
+-PyObject *spi;
+-PyObject *unknown;
+-PyObject *board;
+-PyObject *bcm;
+-PyObject *pud_off;
+-PyObject *pud_up;
+-PyObject *pud_down;
+-PyObject *rising_edge;
+-PyObject *falling_edge;
+-PyObject *both_edge;
++extern PyObject *high;
++extern PyObject *low;
++extern PyObject *input;
++extern PyObject *output;
++extern PyObject *pwm;
++extern PyObject *serial;
++extern PyObject *i2c;
++extern PyObject *spi;
++extern PyObject *unknown;
++extern PyObject *board;
++extern PyObject *bcm;
++extern PyObject *pud_off;
++extern PyObject *pud_up;
++extern PyObject *pud_down;
++extern PyObject *rising_edge;
++extern PyObject *falling_edge;
++extern PyObject *both_edge;
+
+ void define_constants(PyObject *module);
+diff -purN python-rpi-gpio.org/source/event_gpio.c python-rpi-gpio/source/event_gpio.c
+--- python-rpi-gpio.org/source/event_gpio.c 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/event_gpio.c 2020-08-07 09:42:05.564483136 +0200
+@@ -57,7 +57,7 @@ struct callback
+ };
+ struct callback *callbacks = NULL;
+
+-pthread_t threads;
++static pthread_t threads;
+ int event_occurred[54] = { 0 };
+ int thread_running = 0;
+ int epfd_thread = -1;
+diff -purN python-rpi-gpio.org/source/py_pwm.h python-rpi-gpio/source/py_pwm.h
+--- python-rpi-gpio.org/source/py_pwm.h 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/py_pwm.h 2020-08-07 09:38:49.445646807 +0200
+@@ -20,5 +20,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR
+ SOFTWARE.
+ */
+
+-PyTypeObject PWMType;
++extern PyTypeObject PWMType;
+ PyTypeObject *PWM_init_PWMType(void);
+diff -purN python-rpi-gpio.org/source/soft_pwm.c python-rpi-gpio/source/soft_pwm.c
+--- python-rpi-gpio.org/source/soft_pwm.c 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/soft_pwm.c 2020-08-07 09:42:40.753160437 +0200
+@@ -25,7 +25,7 @@ SOFTWARE.
+ #include <time.h>
+ #include "c_gpio.h"
+ #include "soft_pwm.h"
+-pthread_t threads;
++static pthread_t threads;
+
+ struct pwm
+ {
+diff -purN python-rpi-gpio.org/source/soft_pwm.h python-rpi-gpio/source/soft_pwm.h
+--- python-rpi-gpio.org/source/soft_pwm.h 2019-07-21 14:41:22.000000000 +0200
++++ python-rpi-gpio/source/soft_pwm.h 2020-08-07 09:39:25.916811352 +0200
+@@ -26,4 +26,4 @@ void pwm_set_duty_cycle(unsigned int gpi
+ void pwm_set_frequency(unsigned int gpio, float freq);
+ void pwm_start(unsigned int gpio);
+ void pwm_stop(unsigned int gpio);
+-int pwm_exists(unsigned int gpio);
++extern int pwm_exists(unsigned int gpio);
--
2.28.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
2020-08-07 11:37 [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x Michael Fischer
@ 2020-08-07 19:46 ` Yann E. MORIN
0 siblings, 0 replies; 7+ messages in thread
From: Yann E. MORIN @ 2020-08-07 19:46 UTC (permalink / raw)
To: buildroot
Michael, All,
On 2020-08-07 13:37 +0200, Michael Fischer spake thusly:
> 0001-fix-build-with-gcc-10.x.patch: Add patch to fix build with gcc 10.x
>
> Signed-off-by: Michael Fischer <mf@go-sys.de>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> .../0001-fix-build-with-gcc-10.x.patch | 117 ++++++++++++++++++
> 1 file changed, 117 insertions(+)
> create mode 100644 package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
>
> diff --git a/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
> new file mode 100644
> index 0000000000..7c7b772894
> --- /dev/null
> +++ b/package/python-rpi-gpio/0001-fix-build-with-gcc-10.x.patch
> @@ -0,0 +1,117 @@
> +Description: This patch fixes the "multiple definition of" errors with gcc10
> +
> +Signed-off-by: Michael Fischer <mf@go-sys.de>
> +
> +diff -purN python-rpi-gpio.org/source/common.h python-rpi-gpio/source/common.h
> +--- python-rpi-gpio.org/source/common.h 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/common.h 2020-08-07 09:31:33.948575964 +0200
> +@@ -30,14 +30,14 @@ SOFTWARE.
> + #define I2C 42
> + #define PWM 43
> +
> +-int gpio_mode;
> +-const int pin_to_gpio_rev1[41];
> +-const int pin_to_gpio_rev2[41];
> +-const int pin_to_gpio_rev3[41];
> +-const int (*pin_to_gpio)[41];
> +-int gpio_direction[54];
> +-rpi_info rpiinfo;
> +-int setup_error;
> +-int module_setup;
> ++extern int gpio_mode;
> ++extern const int pin_to_gpio_rev1[41];
> ++extern const int pin_to_gpio_rev2[41];
> ++extern const int pin_to_gpio_rev3[41];
> ++extern const int (*pin_to_gpio)[41];
> ++extern int gpio_direction[54];
> ++extern rpi_info rpiinfo;
> ++extern int setup_error;
> ++extern int module_setup;
> + int check_gpio_priv(void);
> + int get_gpio_number(int channel, unsigned int *gpio);
> +diff -purN python-rpi-gpio.org/source/constants.h python-rpi-gpio/source/constants.h
> +--- python-rpi-gpio.org/source/constants.h 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/constants.h 2020-08-07 09:32:15.522196618 +0200
> +@@ -23,22 +23,22 @@ SOFTWARE.
> + #define PY_PUD_CONST_OFFSET 20
> + #define PY_EVENT_CONST_OFFSET 30
> +
> +-PyObject *high;
> +-PyObject *low;
> +-PyObject *input;
> +-PyObject *output;
> +-PyObject *pwm;
> +-PyObject *serial;
> +-PyObject *i2c;
> +-PyObject *spi;
> +-PyObject *unknown;
> +-PyObject *board;
> +-PyObject *bcm;
> +-PyObject *pud_off;
> +-PyObject *pud_up;
> +-PyObject *pud_down;
> +-PyObject *rising_edge;
> +-PyObject *falling_edge;
> +-PyObject *both_edge;
> ++extern PyObject *high;
> ++extern PyObject *low;
> ++extern PyObject *input;
> ++extern PyObject *output;
> ++extern PyObject *pwm;
> ++extern PyObject *serial;
> ++extern PyObject *i2c;
> ++extern PyObject *spi;
> ++extern PyObject *unknown;
> ++extern PyObject *board;
> ++extern PyObject *bcm;
> ++extern PyObject *pud_off;
> ++extern PyObject *pud_up;
> ++extern PyObject *pud_down;
> ++extern PyObject *rising_edge;
> ++extern PyObject *falling_edge;
> ++extern PyObject *both_edge;
> +
> + void define_constants(PyObject *module);
> +diff -purN python-rpi-gpio.org/source/event_gpio.c python-rpi-gpio/source/event_gpio.c
> +--- python-rpi-gpio.org/source/event_gpio.c 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/event_gpio.c 2020-08-07 09:42:05.564483136 +0200
> +@@ -57,7 +57,7 @@ struct callback
> + };
> + struct callback *callbacks = NULL;
> +
> +-pthread_t threads;
> ++static pthread_t threads;
> + int event_occurred[54] = { 0 };
> + int thread_running = 0;
> + int epfd_thread = -1;
> +diff -purN python-rpi-gpio.org/source/py_pwm.h python-rpi-gpio/source/py_pwm.h
> +--- python-rpi-gpio.org/source/py_pwm.h 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/py_pwm.h 2020-08-07 09:38:49.445646807 +0200
> +@@ -20,5 +20,5 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR
> + SOFTWARE.
> + */
> +
> +-PyTypeObject PWMType;
> ++extern PyTypeObject PWMType;
> + PyTypeObject *PWM_init_PWMType(void);
> +diff -purN python-rpi-gpio.org/source/soft_pwm.c python-rpi-gpio/source/soft_pwm.c
> +--- python-rpi-gpio.org/source/soft_pwm.c 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/soft_pwm.c 2020-08-07 09:42:40.753160437 +0200
> +@@ -25,7 +25,7 @@ SOFTWARE.
> + #include <time.h>
> + #include "c_gpio.h"
> + #include "soft_pwm.h"
> +-pthread_t threads;
> ++static pthread_t threads;
> +
> + struct pwm
> + {
> +diff -purN python-rpi-gpio.org/source/soft_pwm.h python-rpi-gpio/source/soft_pwm.h
> +--- python-rpi-gpio.org/source/soft_pwm.h 2019-07-21 14:41:22.000000000 +0200
> ++++ python-rpi-gpio/source/soft_pwm.h 2020-08-07 09:39:25.916811352 +0200
> +@@ -26,4 +26,4 @@ void pwm_set_duty_cycle(unsigned int gpi
> + void pwm_set_frequency(unsigned int gpio, float freq);
> + void pwm_start(unsigned int gpio);
> + void pwm_stop(unsigned int gpio);
> +-int pwm_exists(unsigned int gpio);
> ++extern int pwm_exists(unsigned int gpio);
> --
> 2.28.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
2020-08-07 8:17 Michael Fischer
@ 2020-08-07 9:39 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2020-08-07 9:39 UTC (permalink / raw)
To: buildroot
On Fri, 7 Aug 2020 10:17:27 +0200
Michael Fischer <mf@go-sys.de> wrote:
> Signed-off-by: Michael Fischer <mf@go-sys.de>
> ---
> ...hon-rpi-gpio-fix-build-with-gcc-10.x.patch | 113 ++++++++++++++++++
> 1 file changed, 113 insertions(+)
> create mode 100644 package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
>
> diff --git a/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch b/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
> new file mode 100644
> index 0000000000..961b8b398a
> --- /dev/null
> +++ b/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
All patches need a proper commit log and description, with a
Signed-off-by line. See:
https://buildroot.org/downloads/manual/manual.html#_format_and_licensing_of_the_package_patches
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
2020-08-06 19:53 ` Yann E. MORIN
@ 2020-08-07 9:39 ` Michael Fischer
0 siblings, 0 replies; 7+ messages in thread
From: Michael Fischer @ 2020-08-07 9:39 UTC (permalink / raw)
To: buildroot
Yann, All,
okay I have send a new one.
Regards,
Michael.
-----Urspr?ngliche Nachricht-----
Von: Yann E. MORIN [mailto:yann.morin.1998 at free.fr]
Gesendet: Donnerstag, 6. August 2020 21:54
An: Michael Fischer <mf@go-sys.de>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
Michael, All,
On 2020-08-06 13:23 +0200, Michael Fischer spake thusly:
> Signed-off-by: Michael Fischer <mf@go-sys.de>
> ---
> package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch | 8 ++++++++
> 1 file changed, 8 insertions(+)
> create mode 100644
> package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
>
> diff --git a/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
> b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
> new file mode 100644
> index 0000000000..1bac987267
> --- /dev/null
> +++ b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
> @@ -0,0 +1,8 @@
> +--- a/setup.py 2019-07-21 14:49:21.000000000 +0200
> ++++ b/setup.py 2020-08-06 10:59:51.455133324 +0200
> +@@ -43,4 +43,4 @@
> + url = 'http://sourceforge.net/projects/raspberry-gpio-python/',
> + classifiers = classifiers,
> + packages = ['RPi','RPi.GPIO'],
> +- ext_modules = [Extension('RPi._GPIO', ['source/py_gpio.c', 'source/c_gpio.c', 'source/cpuinfo.c', 'source/event_gpio.c', 'source/soft_pwm.c', 'source/py_pwm.c', 'source/common.c', 'source/constants.c'])])
> ++ ext_modules = [Extension('RPi._GPIO', [...],extra_link_args=['-Wl,--allow-multiple-definition'] )])
As Thomas said in his review on another patch of yours, we really want to fix the problem, not paper over it.
Care to actually fix the code and respin a better fix, please?
Regards,
Yann E. MORIN.
> 2.28.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
| conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
@ 2020-08-07 8:17 Michael Fischer
2020-08-07 9:39 ` Thomas Petazzoni
0 siblings, 1 reply; 7+ messages in thread
From: Michael Fischer @ 2020-08-07 8:17 UTC (permalink / raw)
To: buildroot
Signed-off-by: Michael Fischer <mf@go-sys.de>
---
...hon-rpi-gpio-fix-build-with-gcc-10.x.patch | 113 ++++++++++++++++++
1 file changed, 113 insertions(+)
create mode 100644 package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
diff --git a/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch b/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
new file mode 100644
index 0000000000..961b8b398a
--- /dev/null
+++ b/package/python-rpi-gpio/0001-package-python-rpi-gpio-fix-build-with-gcc-10.x.patch
@@ -0,0 +1,113 @@
+diff -Naur a/source/common.h b/source/common.h
+--- a/source/common.h 2019-07-21 14:41:22.000000000 +0200
++++ b/source/common.h 2020-08-07 09:31:33.948575964 +0200
+@@ -30,14 +30,14 @@
+ #define I2C 42
+ #define PWM 43
+
+-int gpio_mode;
+-const int pin_to_gpio_rev1[41];
+-const int pin_to_gpio_rev2[41];
+-const int pin_to_gpio_rev3[41];
+-const int (*pin_to_gpio)[41];
+-int gpio_direction[54];
+-rpi_info rpiinfo;
+-int setup_error;
+-int module_setup;
++extern int gpio_mode;
++extern const int pin_to_gpio_rev1[41];
++extern const int pin_to_gpio_rev2[41];
++extern const int pin_to_gpio_rev3[41];
++extern const int (*pin_to_gpio)[41];
++extern int gpio_direction[54];
++extern rpi_info rpiinfo;
++extern int setup_error;
++extern int module_setup;
+ int check_gpio_priv(void);
+ int get_gpio_number(int channel, unsigned int *gpio);
+diff -Naur a/source/constants.h b/source/constants.h
+--- a/source/constants.h 2019-07-21 14:41:22.000000000 +0200
++++ b/source/constants.h 2020-08-07 09:32:15.522196618 +0200
+@@ -23,22 +23,22 @@
+ #define PY_PUD_CONST_OFFSET 20
+ #define PY_EVENT_CONST_OFFSET 30
+
+-PyObject *high;
+-PyObject *low;
+-PyObject *input;
+-PyObject *output;
+-PyObject *pwm;
+-PyObject *serial;
+-PyObject *i2c;
+-PyObject *spi;
+-PyObject *unknown;
+-PyObject *board;
+-PyObject *bcm;
+-PyObject *pud_off;
+-PyObject *pud_up;
+-PyObject *pud_down;
+-PyObject *rising_edge;
+-PyObject *falling_edge;
+-PyObject *both_edge;
++extern PyObject *high;
++extern PyObject *low;
++extern PyObject *input;
++extern PyObject *output;
++extern PyObject *pwm;
++extern PyObject *serial;
++extern PyObject *i2c;
++extern PyObject *spi;
++extern PyObject *unknown;
++extern PyObject *board;
++extern PyObject *bcm;
++extern PyObject *pud_off;
++extern PyObject *pud_up;
++extern PyObject *pud_down;
++extern PyObject *rising_edge;
++extern PyObject *falling_edge;
++extern PyObject *both_edge;
+
+ void define_constants(PyObject *module);
+diff -Naur a/source/event_gpio.c b/source/event_gpio.c
+--- a/source/event_gpio.c 2019-07-21 14:41:22.000000000 +0200
++++ b/source/event_gpio.c 2020-08-07 09:42:05.564483136 +0200
+@@ -57,7 +57,7 @@
+ };
+ struct callback *callbacks = NULL;
+
+-pthread_t threads;
++static pthread_t threads;
+ int event_occurred[54] = { 0 };
+ int thread_running = 0;
+ int epfd_thread = -1;
+diff -Naur a/source/py_pwm.h b/source/py_pwm.h
+--- a/source/py_pwm.h 2019-07-21 14:41:22.000000000 +0200
++++ b/source/py_pwm.h 2020-08-07 09:38:49.445646807 +0200
+@@ -20,5 +20,5 @@
+ SOFTWARE.
+ */
+
+-PyTypeObject PWMType;
++extern PyTypeObject PWMType;
+ PyTypeObject *PWM_init_PWMType(void);
+diff -Naur a/source/soft_pwm.c b/source/soft_pwm.c
+--- a/source/soft_pwm.c 2019-07-21 14:41:22.000000000 +0200
++++ b/source/soft_pwm.c 2020-08-07 09:42:40.753160437 +0200
+@@ -25,7 +25,7 @@
+ #include <time.h>
+ #include "c_gpio.h"
+ #include "soft_pwm.h"
+-pthread_t threads;
++static pthread_t threads;
+
+ struct pwm
+ {
+diff -Naur a/source/soft_pwm.h b/source/soft_pwm.h
+--- a/source/soft_pwm.h 2019-07-21 14:41:22.000000000 +0200
++++ b/source/soft_pwm.h 2020-08-07 09:39:25.916811352 +0200
+@@ -26,4 +26,4 @@
+ void pwm_set_frequency(unsigned int gpio, float freq);
+ void pwm_start(unsigned int gpio);
+ void pwm_stop(unsigned int gpio);
+-int pwm_exists(unsigned int gpio);
++extern int pwm_exists(unsigned int gpio);
--
2.28.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
2020-08-06 11:23 Michael Fischer
@ 2020-08-06 19:53 ` Yann E. MORIN
2020-08-07 9:39 ` Michael Fischer
0 siblings, 1 reply; 7+ messages in thread
From: Yann E. MORIN @ 2020-08-06 19:53 UTC (permalink / raw)
To: buildroot
Michael, All,
On 2020-08-06 13:23 +0200, Michael Fischer spake thusly:
> Signed-off-by: Michael Fischer <mf@go-sys.de>
> ---
> package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch | 8 ++++++++
> 1 file changed, 8 insertions(+)
> create mode 100644 package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
>
> diff --git a/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
> new file mode 100644
> index 0000000000..1bac987267
> --- /dev/null
> +++ b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
> @@ -0,0 +1,8 @@
> +--- a/setup.py 2019-07-21 14:49:21.000000000 +0200
> ++++ b/setup.py 2020-08-06 10:59:51.455133324 +0200
> +@@ -43,4 +43,4 @@
> + url = 'http://sourceforge.net/projects/raspberry-gpio-python/',
> + classifiers = classifiers,
> + packages = ['RPi','RPi.GPIO'],
> +- ext_modules = [Extension('RPi._GPIO', ['source/py_gpio.c', 'source/c_gpio.c', 'source/cpuinfo.c', 'source/event_gpio.c', 'source/soft_pwm.c', 'source/py_pwm.c', 'source/common.c', 'source/constants.c'])])
> ++ ext_modules = [Extension('RPi._GPIO', [...],extra_link_args=['-Wl,--allow-multiple-definition'] )])
As Thomas said in his review on another patch of yours, we really want
to fix the problem, not paper over it.
Care to actually fix the code and respin a better fix, please?
Regards,
Yann E. MORIN.
> 2.28.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x
@ 2020-08-06 11:23 Michael Fischer
2020-08-06 19:53 ` Yann E. MORIN
0 siblings, 1 reply; 7+ messages in thread
From: Michael Fischer @ 2020-08-06 11:23 UTC (permalink / raw)
To: buildroot
Signed-off-by: Michael Fischer <mf@go-sys.de>
---
package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
diff --git a/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
new file mode 100644
index 0000000000..1bac987267
--- /dev/null
+++ b/package/python-rpi-gpio/0001-Fix-build-with-gcc-10.patch
@@ -0,0 +1,8 @@
+--- a/setup.py 2019-07-21 14:49:21.000000000 +0200
++++ b/setup.py 2020-08-06 10:59:51.455133324 +0200
+@@ -43,4 +43,4 @@
+ url = 'http://sourceforge.net/projects/raspberry-gpio-python/',
+ classifiers = classifiers,
+ packages = ['RPi','RPi.GPIO'],
+- ext_modules = [Extension('RPi._GPIO', ['source/py_gpio.c', 'source/c_gpio.c', 'source/cpuinfo.c', 'source/event_gpio.c', 'source/soft_pwm.c', 'source/py_pwm.c', 'source/common.c', 'source/constants.c'])])
++ ext_modules = [Extension('RPi._GPIO', ['source/py_gpio.c', 'source/c_gpio.c', 'source/cpuinfo.c', 'source/event_gpio.c', 'source/soft_pwm.c', 'source/py_pwm.c', 'source/common.c', 'source/constants.c'],extra_link_args=['-Wl,--allow-multiple-definition'] )])
--
2.28.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-08-07 19:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 11:37 [Buildroot] [PATCH 1/1] package/python-rpi-gpio: fix build with gcc 10.x Michael Fischer
2020-08-07 19:46 ` Yann E. MORIN
-- strict thread matches above, loose matches on Subject: below --
2020-08-07 8:17 Michael Fischer
2020-08-07 9:39 ` Thomas Petazzoni
2020-08-06 11:23 Michael Fischer
2020-08-06 19:53 ` Yann E. MORIN
2020-08-07 9:39 ` Michael Fischer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.