LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-22-2018, 04:55 AM   #16
PeMaCN
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled

So here are the final steps I make:

Quote:
FROM alpine:3.8

ENV LANG=C.UTF-8

RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" && \
ALPINE_GLIBC_PACKAGE_VERSION="2.27-r0" && \
ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \
apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
echo \
"-----BEGIN PUBLIC KEY-----\
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApZ2u1KJKUu/fW4A25y9m\
y70AGEa/J3Wi5ibNVGNn1gT1r0VfgeWd0pUybS4UmcHdiNzxJPgoWQhV2SSW1JYu\
tOqKZF5QSN6X937PTUpNBjUvLtTQ1ve1fp39uf/lEXPpFpOPL88LKnDBgbh7wkCp\
m2KzLVGChf83MS0ShL6G9EQIAUxLm99VpgRjwqTQ/KfzGtpke1wqws4au0Ab4qPY\
KXvMLSPLUp7cfulWvhmZSegr5AdhNw5KNizPqCJT8ZrGvgHypXyiFvvAH5YRtSsc\
Zvo9GI2e2MaZyo9/lvb+LbLEJZKEQckqRj4P26gmASrZEPStwc+yqy1ShHLA0j6m\
1QIDAQAB\
-----END PUBLIC KEY-----" | sed 's/ */\n/g' > "/etc/apk/keys/sgerrand.rsa.pub" && \
wget \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
apk add --no-cache \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
\
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
/usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true && \
echo "export LANG=$LANG" > /etc/profile.d/locale.sh && \
\
apk del glibc-i18n && \
\
rm "/root/.wget-hsts" && \
apk del .build-dependencies && \
rm \
"$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
"$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" && \
apk add --no-cache make gcc linux-headers bsd-compat-headers binutils coreutils diffutils gettext bash grep sed texinfo perl util-linux vim libc-dev && \
apk add numactl-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted && \
wget https://git.dpdk.org/dpdk-stable/sna...16.11.8.tar.gz && \
tar -xzf dpdk-stable-16.11.8.tar.gz && \
export LD_LIBRARY_PATH=/usr/glibc-compat/lib && \
/usr/glibc-compat/sbin/ldconfig
Pay attention to the last two lines!

I also added /usr/glibc-compat/lib to /etc/ld.so.conf

Then I have executed make install T=x86_64-native-linuxapp-gcc.

Few errors appeared. I fixed them by adding #include <fcntl.h> to lib/librte_eal/common/include/rte_common.h and CFLAGS += -D_GNU_SOURCE to lib/librte_eal/linuxapp/eal/Makefile.

Now I am getting the following error:

Quote:
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c: In function 'vfio_mp_sync_send_fd':
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c:76:17: error: 'struct cmsghdr' has no member named '__cmsg_data'
memcpy((chdr).__cmsg_data, &(fd), sizeof(fd));\
^
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c:188:2: note: in expansion of macro 'FD_TO_CMSGHDR'
FD_TO_CMSGHDR(fd, *chdr);
^~~~~~~~~~~~~
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c: In function 'vfio_mp_sync_receive_fd':
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c:79:24: error: 'struct cmsghdr' has no member named '__cmsg_data'
memcpy(&(fd), (chdr).__cmsg_data, sizeof(fd))
^
/dpdk-stable-16.11.8/lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c:229:2: note: in expansion of macro 'CMSGHDR_TO_FD'
CMSGHDR_TO_FD(*chdr, fd);
^~~~~~~~~~~~~
This error is because musl is used instead of glibc.

Same error appears if I execute make install T=x86_64-native-linuxapp-gcc -Wl,-rpath=/usr/glibc-compat/lib.
 
Old 10-22-2018, 05:04 AM   #17
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
Quote:
Originally Posted by PeMaCN View Post


This error is because musl is used instead of glibc.
No, this is false. What you made was just building, a step before linking. build-time the include files are taken into account, not the lib (glibc) itself.


Most probably it is CFLAGS related, but I'm not really sure if that dpdk source and the used headers are compatible.
 
Old 10-22-2018, 05:07 AM   #18
PeMaCN
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Do you suggest something? Can you help me to solve this?

I thought it is due to the C library because of this

Last edited by PeMaCN; 10-22-2018 at 05:11 AM.
 
Old 10-22-2018, 09:19 AM   #19
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
unfortunately not. It looks like an incompatibility issue. But I have no idea what is wrong, what should be changed to make it work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache2 "Symbolic link not allowed or link target not accessible" on VirtualBox, Shared Folders sundialsvcs Linux - Virtualization and Cloud 0 03-05-2016 12:45 AM
How to use DPDK inside Linux containers? sindh Linux - Newbie 2 03-25-2015 04:01 AM
How do I link to a non-default glibc library? coffeenet Programming 2 12-10-2012 05:20 AM
Local Glibc shared library (.so) exploit jayjwa Linux - Security 3 04-09-2010 10:45 AM
kdevelop3 glibc error when linking to shared libraries yola77 Programming 2 08-22-2006 10:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration