klakegg/docker-hugo

klakegg/hugo:ext-alpine libstdc++.so.6 symbol not found

lacrimal opened this issue · 4 comments

Hi,
Having some troubles with getting to work klakegg/hugo:ext-alpine with asciidoctorjs from npm on gitlab

it was always finalized with:

npm i -g --save asciidoctor
Error relocating /usr/lib/libstdc++.so.6: __fprintf_chk: symbol not found
Error relocating /usr/lib/libstdc++.so.6: __strftime_l: symbol not found
Error relocating /usr/lib/libstdc++.so.6: __cxa_thread_atexit_impl: symbol not found
Error relocating /usr/lib/libstdc++.so.6: __sprintf_chk: symbol not found
Error relocating /usr/bin/node: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
Error relocating /usr/bin/node: _ZNSt19_Sp_make_shared_tag5_S_eqERKSt9type_info: symbol not found
Error relocating /usr/bin/node: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found

my only solution is now:

  before_script:  
  - apk del libstdc++
  - set -x && apk add --force-overwrite --no-cache --update libc6-compat libstdc++
  - /usr/glibc-compat/sbin/ldconfig

It is strange because you can't install libc6-compat only, you also need to remove then install with force both libc6-compat and libstdc++.

herei is full build stage:

build:
  stage: build
  image: 
    name: klakegg/hugo:ext-alpine
    entrypoint: [""]
  tags: 
  - docker
  #- private
  before_script:  
  - apk del libstdc++
  - set -x && apk add --force-overwrite --no-cache --update libc6-compat libstdc++
  - /usr/glibc-compat/sbin/ldconfig
  script:
  - hugo version
  - git submodule update --init --recursive
  - apk add npm
  - npm i -g --save asciidoctor
  - npm i -g --save @asciidoctor/core
  - npm i -g --save asciidoctor-kroki asciidoctor-html5s
  - mv /usr/bin/asciidoctor /usr/bin/asciidoctor_org
  - printf '#!/bin/sh\n# This is a bash comment inside the script \n/usr/bin/asciidoctor_org -r asciidoctor-kroki -r asciidoctor-html5s -b html5  -a kroki-fetch-diagram=true -a icons=font "$@"\n' > /usr/bin/asciidoctor
  - chmod 775 /usr/bin/asciidoctor
  - hugo -v -D --destination ./public
  artifacts:
    paths:
    - public
  only:
  - master

Is there more elegant solution ?

Thank you for reporting this.

I've made a fix, and you may test is using klakegg/hugo:edge-ext-alpine.

Thanks!
Can confirm it works now without before_script commands.
Should I stay on edge-ext-alpine ?

Images prefixed with edge- includes functionality to become released when we see the next Hugo release. If the image does the job, I'd suggest to use it until Hugo version 0.75.2 or 0.76.0 is released.

Ok, once again thanks, great job :-)