Skip to content

Commit

Permalink
Add libyaml
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulChristophel committed Dec 20, 2024
1 parent 6d45378 commit 8a6574e
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.19.4
======

* Add libyaml 0.2.5 to address error during build
"yaml/_yaml.h:2:10: fatal error: yaml.h: No such file or directory"
* Update _CONFIG_VARS_DEFAULTS to point to python 3.9, because 3.8
is unsupported.


0.19.3
======

Expand Down
43 changes: 43 additions & 0 deletions relenv/build/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,36 @@ def build_sasl(env, dirs, logfp):
runcmd(["make", "install"], env=env, stderr=logfp, stdout=logfp)


def build_libyaml(env, dirs, logfp):
"""
Build libyaml.
:param env: The environment dictionary
:type env: dict
:param dirs: The working directories
:type dirs: ``relenv.build.common.Dirs``
:param logfp: A handle for the log file
:type logfp: file
"""
# Ensure position-independent code for shared libraries
env["CFLAGS"] = "-fPIC {}".format(env.get("CFLAGS", ""))

runcmd(
[
"./configure",
"--prefix={}".format(dirs.prefix),
"--libdir={}/lib".format(dirs.prefix), # Specify library directory
"--build={}".format(env["RELENV_BUILD"]),
"--host={}".format(env["RELENV_HOST"]),
],
env=env,
stderr=logfp,
stdout=logfp,
)
runcmd(["make", "-j8"], env=env, stderr=logfp, stdout=logfp)
runcmd(["make", "install"], env=env, stderr=logfp, stdout=logfp)


def build_openldap(env, dirs, logfp):
"""
Build openldap.
Expand Down Expand Up @@ -720,10 +750,23 @@ def build_python(env, dirs, logfp):
},
)

build.add(
"libyaml",
build_func=build_libyaml,
download={
"url": "https://github.com/yaml/libyaml/releases/download/{version}/yaml-{version}.tar.gz",
"fallback_url": "https://nexus.oit.gatech.edu/relenv/dependencies/yaml-{version}.tar.gz",
"version": "0.2.5",
"checksum": "f49b39644caccabef049e3ec8859e8fdf94b686e",
"checkfunc": tarball_version,
},
)

build.add(
"python",
build_func=build_python,
wait_on=[
"libyaml",
"openssl",
"libxcrypt",
"XZ",
Expand Down
2 changes: 1 addition & 1 deletion relenv/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import time

# relenv package version
__version__ = "0.19.3"
__version__ = "0.19.4"

MODULE_DIR = pathlib.Path(__file__).resolve().parent

Expand Down
2 changes: 1 addition & 1 deletion relenv/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def wrapped(name):
"CFLAGS": "-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall",
"CPPFLAGS": "-I. -I./Include",
"CXX": "g++",
"LIBDEST": "/usr/local/lib/python3.8",
"LIBDEST": "/usr/local/lib/python3.9",
"SCRIPTDIR": "/usr/local/lib",
"BLDSHARED": "gcc -shared",
"LDFLAGS": "",
Expand Down

0 comments on commit 8a6574e

Please sign in to comment.