Ship everything with Lfortran

The above thread mentioned it.

I was wondering if it could be like the gFortran from Equation. It has a x86_64-w64-mingw32 folder. All the prebuilt libs are under it. When you write your Fortran code, just link the libs in there. Even no need to specify the -I & -L in compile command.

Maybe a Lfortran_libs project. Put all packages Lfortran can compile in it.

Take NetCDF as an example, put its source under D:\Lfortran_libs\src\NetCDF. Build it and install it to D:\lfortran\x86_64-w64 along side D:\lfortran\lib and D:\lfortran\bin

It could also has a prebuilt Lfortran_libs. After download, just unzip at D:\lfortran\x86_64-w64. No need to worry about compiling all the libs.

Regards

Cean

1 Like

One option to do that is to package a full distribution using conda internally, which has all the dependencies on all platforms and is well tested on all platforms. But users would not necessarily see it, they would just see a giant tarball that you unpack (or some kind of an installer).

@Cean would that satisfy what you are looking for?

I am not a fun of conda. Sometimes it is too big and used all my data quote in one download. I only care one platform - windows 10.

Ok. Let’s focus on the requirements, and we’ll figure out the right solution. Is the requirement to have a windows installer that has all the dependencies included, so everything just works?

no need to install. just unzip.

1 Like

Build libs with cmake. Windows, Linux,…

Install it on to lFortran\x86_64-w64

Zip the lFortran\x86_64-w64 folder and publish.

Then I can download the zip file and unzip it under my lFortran\x86_64-w64 and begin to use the libs.

lFortran needs to looking for libs and includes in lFortran\x86_64-w64 folder.

cmake_minimum_required(VERSION 4.0)

project(Lfortran_libs Fortran C)

set(Lfortran_libs_MAJOR_VERSION 0)
set(Lfortran_libs_MINOR_VERSION 1)
set(Lfortran_libs_PATCH_VERSION 0)

set(CMAKE_INSTALL_PREFIX "D:/lfortran/x86_64-w64")

# --------------------------------------------------
option(FORIGES "Build forIGES" ON)
option(FORMIDI "Build FORMIDI" ON)
option(GLFW "Build GLFW" ON)
option(LAPACK "Build LAPACK" OFF)

set(EXECUTABLE_OUTPUT_PATH "../x86_64-w64/bin")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "../x86_64-w64/lib")
set(CMAKE_Fortran_MODULE_DIRECTORY "../x86_64-w64/mod")

if(FORIGES)
  add_subdirectory(forIGES)
endif()

if(FORMIDI)
  add_subdirectory(formidi)
endif()

if(GLFW)
  add_subdirectory(glfw-3.3.9)
endif()

if(LAPACK)
  add_subdirectory(lapack-3.11.0)
endif()

Have you tried conda clean ? How to Reclaim Disk Space with Conda Clean | Anaconda I’ve managed to reclaim more than 60Gb of space without breaking the environements thanks to this

In terms of clean packaging that works all over the place, conda is the closest there is so far to a cross-platform package manager.

1 Like