XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    libfuse.so: error adding symbols: File in wrong format

    Scheduled Pinned Locked Moved Xen Orchestra
    45 Posts 7 Posters 12.6k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • julien-fJ Offline
      julien-f Vates 🪐 Co-Founder XO Team @mavoff
      last edited by

      @maverick I have no idea what you get this npm error, we haven't been able to reproduce.

      Have you tried running npm with --force or --legacy-peer-deps like the error message suggests?

      M 2 Replies Last reply Reply Quote 0
      • M Offline
        mavoff @julien-f
        last edited by

        @julien-f Hi Julien I haven't, but I will do it and let you know the results. I've already started another XO instance non-ARM until this one gets working again, let me know if you'd like me to wipe it clean and install from scratch.
        Will do the --legacy-peer-deps and --force afterwards depending on outcome

        1 Reply Last reply Reply Quote 1
        • M Offline
          mavoff @julien-f
          last edited by

          @julien-f

          It continues with errors.

          # npm install --force
          npm WARN using --force Recommended protections disabled.
          
          up to date, audited 3281 packages in 10s
          
          213 packages are looking for funding
            run `npm fund` for details
          
          63 vulnerabilities (5 low, 8 moderate, 46 high, 4 critical)
          
          To address issues that do not require attention, run:
            npm audit fix
          
          To address all issues possible (including breaking changes), run:
            npm audit fix --force
          
          Some issues need review, and may require choosing
          a different dependency.
          
          Run `npm audit` for details.
          [root@xo-admin xen-orchestra]# yarn
          yarn install v1.22.19
          warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
          [1/5] Validating package.json...
          [2/5] Resolving packages...
          warning vuepress > @vuepress/core > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
          warning Lockfile has incorrect entry for "styled-components@^3.1.5". Ignoring it.
          warning workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > gulp-watch > chokidar > fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
          [3/5] Fetching packages...
          [4/5] Linking dependencies...
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > @xen-orchestra/fs > @aws-sdk/lib-storage@3.72.0" has unmet peer dependency "@aws-sdk/abort-controller@^3.0.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > enzyme-adapter-react-15@1.4.3" has incorrect peer dependency "react@^15.5.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > enzyme-adapter-react-15@1.4.3" has incorrect peer dependency "react-dom@^15.5.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > enzyme-adapter-react-15@1.4.3" has incorrect peer dependency "react-test-renderer@^15.5.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-addons-test-utils@15.6.2" has incorrect peer dependency "react-dom@^15.4.2".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-dom@18.2.0" has incorrect peer dependency "react@^18.2.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-select@1.3.0" has incorrect peer dependency "react-dom@^0.14.9 || ^15.3.0 || ^16.0.0-rc || ^16.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-shortcuts@2.1.0" has incorrect peer dependency "react-dom@^0.14.8 || ^15 || ^16".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-test-renderer@18.2.0" has incorrect peer dependency "react@^18.2.0".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > uncontrollable-input@0.1.1" has incorrect peer dependency "react@>=15.4.2".
          warning "workspace-aggregator-3a0c2cd3-09f2-49f2-8671-cef32d51497f > xo-web > react-test-renderer > react-shallow-renderer@16.15.0" has incorrect peer dependency "react@^16.0.0 || ^17.0.0 || ^18.0.0".
          warning Workspaces can only be enabled in private projects.
          [5/5] Building fresh packages...
          [9/11] ⡀ es5-ext
          [8/11] ⡀ vuepress
          [6/11] ⡀ argon2
          [7/11] ⡀ leveldown
          warning Error running install script for optional dependency: "/opt/xen-orchestra/node_modules/fuse-native: Command failed.
          Exit code: 1
          Command: node-gyp-build
          Arguments: 
          Directory: /opt/xen-orchestra/node_modules/fuse-native
          Output:
          gyp info it worked if it ends with ok
          gyp info using node-gyp@9.0.0
          gyp info using node@16.13.0 | linux | arm64
          gyp info find Python using Python version 3.6.8 found at \"/usr/bin/python3\"
          gyp info spawn /usr/bin/python3
          gyp info spawn args [
          gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
          gyp info spawn args   'binding.gyp',
          gyp info spawn args   '-f',
          gyp info spawn args   'make',
          gyp info spawn args   '-I',
          gyp info spawn args   '/opt/xen-orchestra/node_modules/fuse-native/build/config.gypi',
          gyp info spawn args   '-I',
          gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
          gyp info spawn args   '-I',
          gyp info spawn args   '/root/.cache/node-gyp/16.13.0/include/node/common.gypi',
          gyp info spawn args   '-Dlibrary=shared_library',
          gyp info spawn args   '-Dvisibility=default',
          gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/16.13.0',
          gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
          gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/16.13.0/<(target_arch)/node.lib',
          gyp info spawn args   '-Dmodule_root_dir=/opt/xen-orchestra/node_modules/fuse-native',
          gyp info spawn args   '-Dnode_engine=v8',
          gyp info spawn args   '--depth=.',
          gyp info spawn args   '--no-parallel',
          gyp info spawn args   '--generator-output',
          gyp info spawn args   'build',
          gyp info spawn args   '-Goutput_dir=.'
          gyp info spawn args ]
          gyp info spawn make
          gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
          make: Entering directory '/opt/xen-orchestra/node_modules/fuse-native/build'
            CC(target) Release/obj.target/fuse/fuse-native.o
            SOLINK_MODULE(target) Release/obj.target/fuse.node
          make: Leaving directory '/opt/xen-orchestra/node_modules/fuse-native/build'
          /opt/xen-orchestra/node_modules/fuse-shared-library-linux/libfuse/lib/libfuse.so: error adding symbols: File in wrong format
          collect2: error: ld returned 1 exit status
          make: *** [fuse.target.mk:146: Release/obj.target/fuse.node] Error 1
          gyp ERR! build error 
          gyp ERR! stack Error: `make` failed with exit code: 2
          gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
          gyp ERR! stack     at ChildProcess.emit (node:events:390:28)
          gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
          gyp ERR! System Linux 5.4.17-2136.307.3.1.el8uek.aarch64
          gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
          gyp ERR! cwd /opt/xen-orchestra/node_modules/fuse-native
          success Saved lockfile.
          Done in 64.63s.
          [root@xo-admin xen-orchestra]#
          

          Do you want me to erase this instance and do the install from source from scratch?

          julien-fJ 1 Reply Last reply Reply Quote 0
          • julien-fJ Offline
            julien-f Vates 🪐 Co-Founder XO Team @mavoff
            last edited by

            @maverick

            1. Do not run yarn, it is replaced by npm i
            2. Start with --legacy-peer-deps, only if it does not work try --force
            3. If it still does not work, yes please, retry from scratch.
            M 1 Reply Last reply Reply Quote 0
            • M Offline
              mavoff @julien-f
              last edited by mavoff

              @julien-f hi there,

              I'm sorry for my delay but was a bit overwhelmed with other tasks.

              So running only npm i now gives me the following output:

              # git checkout .
              Updated 13 paths from the index
              
              # git branch
              * fix_fuse_dependancy_arm
                master
              
              # git pull --ff-only
              remote: Enumerating objects: 79, done.
              remote: Counting objects: 100% (73/73), done.
              remote: Compressing objects: 100% (41/41), done.
              remote: Total 79 (delta 36), reused 61 (delta 30), pack-reused 6
              Unpacking objects: 100% (79/79), 87.43 KiB | 3.01 MiB/s, done.
              From https://github.com/vatesfr/xen-orchestra
                 f1ab62524..3d3b63a59  master     -> origin/master
               + 2378c0882...2d9a44c6e tasks      -> origin/tasks  (forced update)
              Already up to date.
              
              # npm i
              npm WARN deprecated modular-cssify@12.1.3: Renamed to @modular-css/browserify
              npm WARN deprecated modular-css-core@12.1.3: Renamed to @modular-css/processor
              npm WARN deprecated chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
              npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
              
              added 267 packages, removed 204 packages, changed 54 packages, and audited 3280 packages in 37s
              
              209 packages are looking for funding
                run `npm fund` for details
              
              70 vulnerabilities (5 low, 13 moderate, 49 high, 3 critical)
              
              To address issues that do not require attention, run:
                npm audit fix
              
              To address all issues possible (including breaking changes), run:
                npm audit fix --force
              
              Some issues need review, and may require choosing
              a different dependency.
              
              Run `npm audit` for details.
              # 
              

              This seems to throw a lot of warnings but no fatal errors, do you confirm? Also it's not suggesting to use the --legacy-peer-deps flag.

              After using these commands and rebooting the host, XO is stopped.
              Is npm i the same as yarn; yarn build ? Thank you!

              edit: when I get an hour I'll redo from scratch to see how that goes.

              julien-fJ 1 Reply Last reply Reply Quote 0
              • EzkaE Offline
                Ezka
                last edited by Ezka

                Hi, as I'm facing the same issue for the arm64 docker, I've build it in qemu with your fix_fuse_dependancy_arm branch and it works for me.

                1 Reply Last reply Reply Quote 2
                • julien-fJ Offline
                  julien-f Vates 🪐 Co-Founder XO Team @mavoff
                  last edited by

                  @maverick npm i replace yarn, not yarn build.

                  M 1 Reply Last reply Reply Quote 0
                  • M Offline
                    mavoff @julien-f
                    last edited by

                    @julien-f so i should issue yarn build after doing npm i gotcha. Give me a couple minutes will update you in an instant.

                    M 1 Reply Last reply Reply Quote 1
                    • M Offline
                      mavoff @mavoff
                      last edited by

                      after building when I open XO on the browser I only get an error saying

                      Cannot GET /

                      I'll have to redo from source. Give me a couple of days please I've been a bit overwhelmed these last days

                      julien-fJ 1 Reply Last reply Reply Quote 0
                      • julien-fJ Offline
                        julien-f Vates 🪐 Co-Founder XO Team @mavoff
                        last edited by

                        @maverick No hurries, we have a lot on our plates too.

                        M 1 Reply Last reply Reply Quote 1
                        • M Offline
                          mavoff @julien-f
                          last edited by

                          @julien-f thanks. in the meanwhile let me ask @Ezka when you rebuilt did you use npm i instead of yarn or just the plain old yard command?

                          EzkaE 1 Reply Last reply Reply Quote 0
                          • EzkaE Offline
                            Ezka @mavoff
                            last edited by

                            @maverick

                            I've use something like :

                            npm install && npm run build
                            

                            and in doubt I've rebuild with:

                            npm install && yarn build
                            

                            both work, no surprises here.

                            Note that the npm install step on arm64 takes ages ☠ in comparison to the x86_64 arch. It was already slow with yarn, but npm is a pain. I've try to build it on Github infra to release a multiarch docker but it reaches the max execution time 🤷

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              tamas
                              last edited by

                              I am also affected by this error message and now, according to the suggestions posted here, I had been able to build the version. However, now when I want to start the xo-server, I get the following message:

                              # /usr/local/bin/node ./dist/cli.mjs
                              node:internal/modules/cjs/loader:985
                                const err = new Error(message);
                                            ^
                              
                              Error: Cannot find module 'strnum'
                              Require stack:
                              - /opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
                              - /opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
                              - /opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/fxp.js
                                  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
                                  at Function.Module._load (node:internal/modules/cjs/loader:833:27)
                                  at Module.require (node:internal/modules/cjs/loader:1057:19)
                                  at require (node:internal/modules/cjs/helpers:103:18)
                                  at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js:7:18)
                                  at Module._compile (node:internal/modules/cjs/loader:1155:14)
                                  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
                                  at Module.load (node:internal/modules/cjs/loader:1033:32)
                                  at Function.Module._load (node:internal/modules/cjs/loader:868:12)
                                  at Module.require (node:internal/modules/cjs/loader:1057:19)
                                  at require (node:internal/modules/cjs/helpers:103:18)
                                  at Object.<anonymous> (/opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js:2:26)
                                  at Module._compile (node:internal/modules/cjs/loader:1155:14)
                                  at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
                                  at Module.load (node:internal/modules/cjs/loader:1033:32)
                                  at Function.Module._load (node:internal/modules/cjs/loader:868:12) {
                                code: 'MODULE_NOT_FOUND',
                                requireStack: [
                                  '/opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js',
                                  '/opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js',
                                  '/opt/xen-orchestra/packages/xo-server/node_modules/fast-xml-parser/src/fxp.js'
                                ]
                              }
                              

                              What can I do here to get the interface working again?

                              TIA

                              florentF 1 Reply Last reply Reply Quote 0
                              • florentF Offline
                                florent Vates 🪐 XO Team @tamas
                                last edited by

                                @tamas said in libfuse.so: error adding symbols: File in wrong format:

                                fast-xml-parser

                                fast-xml-parser is an older deps (last change is at least a few months old). Do you know which is the last working version on your system ?

                                T 1 Reply Last reply Reply Quote 0
                                • T Offline
                                  tamas @florent
                                  last edited by

                                  @florent said in libfuse.so: error adding symbols: File in wrong format:

                                  @tamas said in libfuse.so: error adding symbols: File in wrong format:

                                  fast-xml-parser

                                  fast-xml-parser is an older deps (last change is at least a few months old). Do you know which is the last working version on your system ?

                                  Unglücklicherweise weiß ich das nicht. Die funktionierende Version hatte ich vor circa 3 Monaten installiert.

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    Mark C @florent
                                    last edited by

                                    @florent said in libfuse.so: error adding symbols: File in wrong format:

                                    @maverick using system li b will add a tight dependency, it will be harder to make it work on exotic systems

                                    I pushed a new patch on the same branch, can you tell me if it solves the problem ?

                                    Hi @florent,

                                    I know this is an old topic, but I was looking to build XO on ARM64 recently and I ran across the issue that the node fuse-native package doesn't support arm64 and appears to be abandoned, and your branch with making it an optional dependancy. Thanks!

                                    However, digging a bit more, I found https://github.com/sagemathinc/fuse-native which looks to be a very recent derivation of the published fuse-native module that has been adjusted to use system libraries on the build host rather than binaries bundled into the module.

                                    Reworking this fix to use this alternative might give working fuse support on ARM64.

                                    What do you think? I guess in terms of the non-ARM64 builds, it is a risk/new dependancy to use the system's fuse libraries but maybe a better approach long term as the libfuse.so in fuse-friends is increasingly old and lacking in updates.

                                    Mark

                                    1 Reply Last reply Reply Quote 0
                                    • olivierlambertO Offline
                                      olivierlambert Vates 🪐 Co-Founder CEO
                                      last edited by

                                      Sounds like a good idea 🙂 However, I don't think our current XOAs are shipped with fuse libs directly, so that might break for our XOA users 🤔

                                      At least we can take a look to test it!

                                      M 1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        Mark C @olivierlambert
                                        last edited by

                                        @olivierlambert - thanks for getting back on this.

                                        My limited testing so far was to substitute the alternate fuse-native module. ( There's probably a better way to do this but I didn't really want to fork the repo for some quick tests! )

                                        • Make a build folder, then git clone https://github.com/sagemathinc/fuse-native
                                        • Edit the sagemathinc package.json so that the name and version match the fuse-friends version (to avoid having to adjust any of the xen-orchestra files directly)
                                        • git clone https://github.com/vatesfr/xen-orchestra.git
                                        • copy the modified fuse-native folder into the xen-orchestra folder
                                        • Run 'yarn link' in xen-orchestra/fuse-native folder to tell yarn to use this local module instead of the fuse-friends version
                                        • Run 'yarn link fuse-native' in the xen-orchestra folder to have the xen-orchestra build use the local version
                                        • Run yarn and yarn build as per the build-from-source page

                                        I got a version of xo-server built from current master, and it started up. I haven't done anything with it yet beyond the initial smoke-test.

                                        Wrinkles - I needed to add pkg-config to the debian 12 build and host VM as sagemathinc's fuse-native module uses that to locate the system libfuse libraries. So if you're looking at the XOA side, then pkg-config would be a new build dependancy in addition to the host's libfuse libraries.

                                        Sincerely,

                                        Mark

                                        xo-server 5.120.2 / xo-web 5.122.2 / commit 3baa378

                                        1 Reply Last reply Reply Quote 0
                                        • olivierlambertO Offline
                                          olivierlambert Vates 🪐 Co-Founder CEO
                                          last edited by

                                          It's not a problem per se to add a new package in XOA, it's just that we can't do that for all existing/running XOAs for our existing customers. So we can't afford to break it. What we usually do, is to regen a new XOA from time to time (a fresh one is coming in September) on Debian 12.

                                          I'll check to see if we can add a package for fuse, but this won't solve it for our existing users 🙂

                                          1 Reply Last reply Reply Quote 0
                                          • florentF Offline
                                            florent Vates 🪐 XO Team
                                            last edited by florent

                                            @Mark-C I can't test easily for now, but I think there may be an easier path after reviewing your solution

                                            fuse-native use fuse-shared-library 1.0.2
                                            from version 1.1 , fuse-shared-library should support ARM , maybe it is possible to bump it in the dependencies of fuse-native ?

                                            This way , it should still work without libfuse on the system, but also build it on arm

                                            M 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post