poky.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
From: "Ulises Vega" <usva.techdev@gmail.com>
To: poky@lists.yoctoproject.org
Subject: Yocto recipe for mozjs 68.2
Date: Sat, 27 Aug 2022 13:51:25 -0500	[thread overview]
Message-ID: <CAFUa6hOxXDqsu9y0qMMYCCnC+p7q1sZHNF2U2x26wwSNstEynQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4872 bytes --]

Hello everyone,

I'm trying to create yocto recipe for mozjs 68.2 from this link:
https://ftp.mozilla.org/pub/firefox/releases/68.2.0esr/source/

it is marking me this error:

| Exception: Failed to create virtualenv:
/mypath/qemu-x86/build/tmp/work/core2-64-poky-linux/mozjs/68.2-r0/firefox-68.2.0/js/src/_build/_virtualenvs/init
| WARNING:
/mypath/qemu-x86/build/tmp/work/core2-64-poky-linux/mozjs/68.2-r0/temp/run.do_configure.5061:1
exit 1 from '../configure --disable-jemalloc --enable-posix-nspr-emulation
--enable-unaligned-private-values --with-system-zlib --with-intl-api
--enable-debug --enable-optimize --x-includes=no --x-libraries=no'
| ERROR: Function failed: do_configure (log file is located at
/mypath/qemu-x86/build/tmp/work/core2-64-poky-linux/mozjs/68.2-r0/temp/log.do_configure.5061)
ERROR: Task (/mypath/meta-mylayer/recipes-myrecipes/mozjs/mozjs_68.2.bb:do_configure)
failed with exit code '1'

I base my recipe on:
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/mozjs/mozjs_52.9.1.bb?h=thud

here is what I have so far:

SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
LICENSE = "CLOSED"
#LIC_FILES_CHKSUM = "file://LICENSE;md5=815ca599c9df247a0c7f619bab123dad"

SRC_URI = "
https://ftp.mozilla.org/pub/firefox/releases/68.2.0esr/source/firefox-68.2.0esr.source.tar.xz
"

SRC_URI[md5sum] = "ff667d8504e9f6ab215e73ba66d11722"
SRC_URI[sha256sum] =
"85f1c2eaf68ebedcbc0b78a342f6d16ef0865dedd426a1bba94b75c85f716f38"

inherit autotools pkgconfig perlnative pythonnative

inherit distro_features_check
CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"

DEPENDS += "nspr zlib"

# Disable null pointer optimization in gcc >= 6
# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
CFLAGS += "-fno-tree-vrp -fno-strict-aliasing
-fno-delete-null-pointer-checks"
CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing
-fno-delete-null-pointer-checks"

# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " --disable-jemalloc --enable-posix-nspr-emulation
--enable-unaligned-private-values --with-system-zlib     --with-intl-api
--enable-debug --enable-optimize"

PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR}
--x-libraries=${STAGING_LIBDIR},--x-includes=no
--x-libraries=no,virtual/libx11"

EXTRA_OEMAKE_task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic
${LDFLAGS}'"
EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static"

export HOST_CC = "${BUILD_CC}"
export HOST_CXX = "${BUILD_CXX}"
export HOST_CFLAGS = "${BUILD_CFLAGS}"
export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"

do_configure() {
    export SHELL="/bin/sh"
    export TMP="${B}"
    echo ${WORKDIR}
    mkdir -p ${WORKDIR}/firefox-68.2.0/js/src/_build
    cd ${WORKDIR}/firefox-68.2.0/js/src/_build
    pwd
    ../configure ${EXTRA_OECONF}
}

do_compile_prepend() {
    export SHELL="/bin/sh"
    export S
    export PYTHONPATH
    cd ${S}

    for sub_dir in python testing/mozbase; do
        for module_dir in `ls $sub_dir -1`;do
            [ $module_dir = "virtualenv" ] && continue
            if [ -d "${S}/$sub_dir/$module_dir" ];then
                PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
            fi
        done
    done
    PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
    cd -
}

do_install_prepend() {
    export SHELL="/bin/sh"
    export S
    export PYTHONPATH
    cd ${S}
    for sub_dir in python testing/mozbase; do
        for module_dir in `ls $sub_dir -1`;do
            [ $module_dir = "virtualenv" ] && continue
            if [ -d "${S}/$sub_dir/$module_dir" ];then
                PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
            fi
        done
    done
    PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
    cd -
}

PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js68-config"

# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only
supported in unified syntax -- `mov r2,r1,LSR#20'
#| {standard input}:2173: Error: unshifted register required -- `bic
r2,r2,#(1<<11)'
#| {standard input}:2174: Error: unshifted register required -- `orr
r1,r1,#(1<<20)'
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode
-- `subs r2,r2,#0x300'
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode
-- `subs r5,r2,#52'
#ARM_INSTRUCTION_SET_armv5 = "arm"
#ARM_INSTRUCTION_SET_armv4 = "arm"

DISABLE_STATIC = ""

Thanks


-- 
Ulises S. Vega A.

[-- Attachment #2: Type: text/html, Size: 6460 bytes --]

                 reply	other threads:[~2022-08-27 18:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFUa6hOxXDqsu9y0qMMYCCnC+p7q1sZHNF2U2x26wwSNstEynQ@mail.gmail.com \
    --to=usva.techdev@gmail.com \
    --cc=poky@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).