Bug#1135358: lfortran: please include the jupyter kernel in the build

Daniel Blaschke blaschke at hep.itp.tuwien.ac.at
Fri May 1 16:33:48 BST 2026


Package: lfortran
Version: 0.63.0-1
Severity: wishlist
Tags: patch
X-Debbugs-Cc: blaschke at hep.itp.tuwien.ac.at

Dear Maintainer,

please consider building lfortran with jupyter backend support.
the patch to do this is:
***
diff --git a/debian/lfortran.install b/debian/lfortran.install
index 9960ec2..ef02be8 100644
--- a/debian/lfortran.install
+++ b/debian/lfortran.install
@@ -1,6 +1,6 @@
 usr/bin/lfortran
-#/usr/share/jupyter/kernels/fortran/kernel.json
-#/usr/share/jupyter/kernels/fortran/logo-svg.svg
+usr/share/jupyter/kernels/fortran/kernel.json
+usr/share/jupyter/kernels/fortran/logo-svg.svg
 usr/share/lfortran/*
 usr/lib/*/*.mod	/usr/lib/${DEB_HOST_MULTIARCH}/fortran/lfortran-mod-0/
 share/lfortran/lfortran-completion.bash /usr/share/bash-completion/completions/
diff --git a/debian/rules b/debian/rules
index a1e9227..e4042d9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,9 +13,6 @@ BUILDDIR=debian/build
 execute_before_dh_auto_clean:
 	rm -fr $(BUILDDIR) version
 
-# -DWITH_XEUS=yes for Jupyter kernel support
-# not currently compiling ?
-
 
 ARCH_FLAGS=$(if $(filter $(DEB_TARGET_ARCH), riscv64), -march=rv64gc -mabi=lp64d,)
 
@@ -38,7 +35,7 @@ override_dh_auto_configure:
 		-DWITH_FMT=yes \
 		-DWITH_BFD=yes	\
 		-DLLVM_DIR=/usr/lib/llvm-21/cmake \
-		-DWITH_XEUS=no \
+		-DWITH_XEUS=yes \
 		-DWITH_KOKKOS=no \
 		-DWITH_MLIR=yes \
 		-DCMAKE_Fortran_MODULE_DIRECTORY=/usr/lib/$(DEB_HOST_MULTIARCH)/fortran/lfortran-mod-0 \
***

Also, it would be nice to have the newest lfortran in stable-backports.
I actually built this package on debian-stable using llvm-19 (since the stable-backports version of llvm-21 is currently missing the openmp library).
The additional changes needed to build on debian stable (and this is what I actually tested)  are:
***
diff --git a/debian/control b/debian/control
index 838d672..df15d7c 100644
--- a/debian/control
+++ b/debian/control
@@ -11,11 +11,10 @@ Build-Depends:  debhelper-compat (= 13),
  python3,
  libfmt-dev,
  libedit-dev,
- libsframe-dev,
- llvm-21-dev [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
+ llvm-19-dev [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
  libunwind-dev [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
- libmlir-21-dev [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
- mlir-21-tools [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
+ libmlir-19-dev [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
+ mlir-19-tools [!armhf !hurd-i386 !sparc64 !powerpc !alpha !hppa !loong64 !m68k !sh4 !x32],
  libjsoncpp-dev,
  binutils-dev,
  libiberty-dev,
@@ -33,7 +32,7 @@ Architecture: any
 Provides: fortran-compiler, lfortran-mod-0
 Built-Using: ${Built-Using}
 Depends: ${misc:Depends}, ${shlibs:Depends}, liblfortran-runtime0 ( = ${binary:Version}), 
- clang-21,
+ clang-19,
  python3:any ,
  liblfortran-dev ( = ${binary:Version}),
 Description: Modern interactive LLVM-based Fortran compiler
diff --git a/debian/lfortran.install b/debian/lfortran.install
index 9960ec2..ef02be8 100644
--- a/debian/lfortran.install
+++ b/debian/lfortran.install
@@ -1,6 +1,6 @@
 usr/bin/lfortran
-#/usr/share/jupyter/kernels/fortran/kernel.json
-#/usr/share/jupyter/kernels/fortran/logo-svg.svg
+usr/share/jupyter/kernels/fortran/kernel.json
+usr/share/jupyter/kernels/fortran/logo-svg.svg
 usr/share/lfortran/*
 usr/lib/*/*.mod	/usr/lib/${DEB_HOST_MULTIARCH}/fortran/lfortran-mod-0/
 share/lfortran/lfortran-completion.bash /usr/share/bash-completion/completions/
diff --git a/debian/patches/series b/debian/patches/series
index 2e69332..9e38819 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,7 @@
 # shared-zlib.patch
 # static zstd is needed for BFD if LLVM not used
 # shared-zstd.patch
-clang-21.patch
+# clang-21.patch
 static-bfd.patch
 cmake-version.patch
 build-script.patch
diff --git a/debian/rules b/debian/rules
index a1e9227..a7375de 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,9 +13,6 @@ BUILDDIR=debian/build
 execute_before_dh_auto_clean:
 	rm -fr $(BUILDDIR) version
 
-# -DWITH_XEUS=yes for Jupyter kernel support
-# not currently compiling ?
-
 
 ARCH_FLAGS=$(if $(filter $(DEB_TARGET_ARCH), riscv64), -march=rv64gc -mabi=lp64d,)
 
@@ -37,12 +34,12 @@ override_dh_auto_configure:
 		-DWITH_LSP=yes \
 		-DWITH_FMT=yes \
 		-DWITH_BFD=yes	\
-		-DLLVM_DIR=/usr/lib/llvm-21/cmake \
-		-DWITH_XEUS=no \
+		-DLLVM_DIR=/usr/lib/llvm-19/cmake \
+		-DWITH_XEUS=yes \
 		-DWITH_KOKKOS=no \
 		-DWITH_MLIR=yes \
 		-DCMAKE_Fortran_MODULE_DIRECTORY=/usr/lib/$(DEB_HOST_MULTIARCH)/fortran/lfortran-mod-0 \
-		-DCMAKE_PREFIX_PATH=/usr/lib/llvm-21/lib/cmake/mlir
+		-DCMAKE_PREFIX_PATH=/usr/lib/llvm-19/lib/cmake/mlir
 
 
 override_dh_gencontrol:
@@ -57,7 +54,7 @@ override_dh_auto_test:
 	@echo Bypass tests on this build
 
 override_dh_shlibdeps:
-	dh_shlibdeps -l/usr/lib/llvm-21/lib -- --ignore-missing-info
+	dh_shlibdeps -l/usr/lib/llvm-19/lib -- --ignore-missing-info
 
 override_dh_dwz:
 	@echo "DWZ fails on .debug_attr sections in some archs; don't use"
***
cheers, daniel


-- System Information:
Debian Release: 13.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lfortran depends on:
ii  clang-19              1:19.1.7-3+b1
ii  libc6                 2.41-12+deb13u2
ii  libgcc-s1             14.2.0-19
ii  liblfortran-dev       0.63.0-1
ii  liblfortran-runtime0  0.63.0-1
ii  libstdc++6            14.2.0-19
ii  libunwind8            1.8.1-0.1
ii  libxeus-zmq6          3.1.0-0.3
ii  libxeus11             5.1.1-0.1
ii  python3               3.13.5-1

lfortran recommends no packages.

lfortran suggests no packages.

-- no debconf information



More information about the debian-science-maintainers mailing list