[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#991638: nodejs: Please enable build on 32-bit PowerPC (powerpc)



Source: nodejs
Severity: normal
Tags: patch
User: debian-powerpc@lists.debian.org
Usertags: powerpc
X-Debbugs-Cc: debian-powerpc@lists.debian.org

Hi!

I just noticed today that NodeJS has principal support for 32-bit PowerPC
which it internally calls it "ppc". While the build does not succeed at
first attempt (see below), the fact that NodeJS supports 32-bit PowerPC
in general means that we should be able to get it working.

Since "powerpc" is not a release architecture, it's perfectly fine if the
package fails to build from source as this will not inhibit the propagation
of the nodejs package to testing.

Thus, could you please modify debian/control and debian/rules accordingly
such that nodejs can be built on 32-bit PowerPC (powerpc)? See attached
patch.

===========================================================================

Current build failure of NodeJS version 14 on 32-bit PowerPC:

In file included from ../deps/v8/src/objects/visitors.h:9,
                 from ../deps/v8/src/heap/heap.h:33,
                 from ../deps/v8/src/heap/factory.h:16,
                 from ../deps/v8/src/execution/isolate.h:28,
                 from ../deps/v8/src/api/api.h:10,
                 from ../deps/v8/src/api/api-arguments.h:8,
                 from ../deps/v8/src/api/api-arguments.cc:5:
../deps/v8/src/objects/code.h:439:2: error: #error Unknown architecture.
  439 | #error Unknown architecture.
      |  ^~~~~
In file included from ../deps/v8/src/execution/isolate.h:18,
                 from ../deps/v8/src/api/api.h:10,
                 from ../deps/v8/src/api/api-arguments.h:8,
                 from ../deps/v8/src/api/api-arguments.cc:5:
../deps/v8/src/objects/code.h:441:55: error: 'kHeaderPaddingSize' was not declared in this scope
  441 |   STATIC_ASSERT(FIELD_SIZE(kOptionalPaddingOffset) == kHeaderPaddingSize);
      |                                                       ^~~~~~~~~~~~~~~~~~
../deps/v8/src/base/macros.h:200:43: note: in definition of macro 'STATIC_ASSERT'
  200 | #define STATIC_ASSERT(test) static_assert(test, #test)
      |                                           ^~~~

Thanks,
Adrian

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
diff -Nru old/nodejs-14.17.0~dfsg/debian/control new/nodejs-14.17.0~dfsg/debian/control
--- old/nodejs-14.17.0~dfsg/debian/control	2021-05-06 12:46:53.000000000 -0700
+++ new/nodejs-14.17.0~dfsg/debian/control	2021-07-29 05:18:48.940185631 -0700
@@ -39,7 +39,7 @@
 
 Package: libnode-dev
 Section: libdevel
-Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel ppc64 ppc64el s390x
+Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el s390x
 Depends: ${misc:Depends},
  libssl-dev (>= 1.1.1~),
  libuv1-dev (>= 1.33.0~),
@@ -59,7 +59,7 @@
  This package provides development headers for libnode83
 
 Package: nodejs
-Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel ppc64 ppc64el s390x
+Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el s390x
 Multi-Arch: foreign
 Depends:
  ${shlibs:Depends},
@@ -87,7 +87,7 @@
 
 Package: libnode83
 Section: libs
-Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel ppc64 ppc64el s390x
+Architecture: amd64 arm64 armhf i386 kfreebsd-i386 kfreebsd-amd64 mips mips64el mips64r6el mipsel powerpc ppc64 ppc64el s390x
 Multi-Arch: same
 Depends: ${shlibs:Depends},
  ${misc:Depends},
diff -Nru old/nodejs-14.17.0~dfsg/debian/rules new/nodejs-14.17.0~dfsg/debian/rules
--- old/nodejs-14.17.0~dfsg/debian/rules	2021-05-06 12:46:53.000000000 -0700
+++ new/nodejs-14.17.0~dfsg/debian/rules	2021-07-29 05:37:52.130131574 -0700
@@ -47,7 +47,7 @@
 destCpu := $(or $(destCpu),$(if $(filter mips64el,$(DEB_HOST_ARCH)),mips64el))
 destCpu := $(or $(destCpu),$(if $(filter mips64r6el,$(DEB_HOST_ARCH)),mips64el))
 destCpu := $(or $(destCpu),$(if $(filter mips,$(DEB_HOST_ARCH)),mips))
-destCpu := $(or $(destCpu),$(if $(filter powerpc,$(DEB_HOST_ARCH)),unsupported))
+destCpu := $(or $(destCpu),$(if $(filter powerpc,$(DEB_HOST_ARCH)),ppc))
 destCpu := $(or $(destCpu),$(if $(filter ppc64,$(DEB_HOST_ARCH)),ppc64))
 destCpu := $(or $(destCpu),$(if $(filter s390x,$(DEB_HOST_ARCH)),s390x))
 

Reply to: