Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"segmentation fault(core dumped)" while moving to ubuntu 16.04 #982

Closed
ethsonliu opened this issue Jul 31, 2019 · 2 comments
Closed

"segmentation fault(core dumped)" while moving to ubuntu 16.04 #982

ethsonliu opened this issue Jul 31, 2019 · 2 comments

Comments

@ethsonliu
Copy link

I builded a console program on ubuntu 14.04 with appimagetool (the lateset release version).

And then I copy the generated *.AppImage to another pure ubuntu 14.04 to test it, and it runs well, so I continued to test it on another pure ubuntu 16.04, but it gived me an error: segmentation fault(core dumped).

Here is the information while using appimagetool to generate *.AppImage on ubuntu 14.04:

appimagetool, continuous build (commit fef038a), build 2093 built on 2019-07-07 12:07:34 UTC
WARNING: appstreamcli command is missing, please install it if you want to use AppStream metadata
Using architecture x86_64
/home/hapoa/projects/HaiwellClient/release/data_interconnection_linux_x64_console should be packaged as data_interconnection-x86_64.AppImage
WARNING: AppStream upstream metadata is missing, please consider creating it
         in usr/share/metainfo/data_interconnection.appdata.xml
         Please see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
         for more information or use the generator at http://output.jsbin.com/qoqukof.
Generating squashfs...
Parallel mksquashfs: Using 1 processor
Creating 4.0 filesystem on data_interconnection-x86_64.AppImage, block size 131072.
[===================================================================================\] 108/108 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
	compressed data, compressed metadata, compressed fragments, compressed xattrs
	duplicates are removed
Filesystem size 4742.00 Kbytes (4.63 Mbytes)
	38.81% of uncompressed filesystem size (12217.80 Kbytes)
Inode table size 651 bytes (0.64 Kbytes)
	58.44% of uncompressed inode table size (1114 bytes)
Directory table size 292 bytes (0.29 Kbytes)
	54.78% of uncompressed directory table size (533 bytes)
Number of duplicate files found 0
Number of inodes 22
Number of files 19
Number of fragments 3
Number of symbolic links  1
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 2
Number of ids (unique uids + gids) 1
Number of uids 1
	root (0)
Number of gids 1
	root (0)
Embedding ELF...
Marking the AppImage as executable...
Embedding MD5 digest
Success

Please consider submitting your AppImage to AppImageHub, the crowd-sourced
central directory of available AppImages, by opening a pull request
at https://github.com/AppImage/appimage.github.io
@ethsonliu
Copy link
Author

I think I found the solution, but I don't know the real reason.

.
├── AppRun
├── data_interconnection
├── data_interconnection.desktop
├── data_interconnection.desktop~
├── .data_interconnection.desktop.swo
├── .data_interconnection.desktop.swp
├── data_interconnection.png
├── .DirIcon -> data_interconnection.png
└── lib
    ├── libcrypto.so.1.1
    ├── libc.so.6
    ├── libdl.so.2
    ├── libgcc_s.so.1
    ├── libmosquitto.so.1
    ├── libm.so.6
    ├── libmysqlclient.so.18
    ├── libpthread.so.0
    ├── librt.so.1
    ├── libssl.so.1.1
    ├── libstdc++.so.6
    └── libz.so.1

I used the below shell to copy the dependent libs,

exe="./data_interconnection_linux_x64_console/data_interconnection"
des="./data_interconnection_linux_x64_console/lib"

deplist=$(ldd $exe | awk  '{if (match($3,"/")){ printf("%s "),$3 } }')
cp $deplist $des

After I removed the below libs from folder lib,

libc.so.6
libgcc_s.so.1
libstdc++.so.6
libm.so.6
libpthread.so.0

All is well.

@probonopd
Copy link
Member

I used the below shell to copy the dependent libs

This was the mistake.

Never bundle those libraries. You can use tools like linuxdeployqt that do it automatically for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants