Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

shm and amd64 multilib

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
dev_zero
n00b
n00b
User avatar
Posts: 28
Joined: Thu Nov 01, 2007 8:53 pm
Location: Somewhere in the kernel source

shm and amd64 multilib

  • Quote

Post by dev_zero » Fri Jan 18, 2008 2:12 am

Codesnippet from fstab

Code: Select all

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for 
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
shm			/dev/shm	tmpfs		nodev,nosuid,noexec	0 0
Got a problem, I'm using amd64 and multilib, and i noticed tmpfs doesn't work. I tried remounting etc etc. but nothing worked. So I made a little test program to find out why it doesn't get mounted properly. The only thing it does was to call shm_open and write out the error I got. The error I got was that the function was not implemented. So I started messing around trying different stuff and I looked into the glibc source (glibc-2.6.1).
I found that in sysdeps/posix/shm_open.c:

Code: Select all

#if ! _POSIX_MAPPED_FILES
#include <rt/shm_open.c>
What rt/shm_open.c does is simple return the error ENOSYS which means the function is not implemented, that would mean that _POSIX_MAPPED_FILES is not defined, but according to /usr/include/bits/posix_opt.h it is defined:

Code: Select all

/* Autogenerated by create_ml_includes() in multilib.eclass */

#ifdef __i386__
# include <gentoo-multilib/x86/bits/posix_opt.h>
#endif /* __i386__ */

#ifdef __x86_64__
# include <gentoo-multilib/amd64/bits/posix_opt.h>
#endif /* __x86_64__ */
because in gentoo-multilib/amd64/bits/posix_opt.h it is defined:

Code: Select all

/* Mapping of files to memory is supported.  */
#define _POSIX_MAPPED_FILES     200112L
I don't understand why the shm tmpfs won't work. Somehow _POSIX_MAPPED_FILES never gets defined, since glibc uses the "empty" shm_open implementation. Can anyone confirm that the multilib isn't working correctly here or am I missing something?


emerge --info, if needed:

Code: Select all

Portage 2.1.3.19 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23.1 x86_64)
=================================================================
System uname: 2.6.23.1 x86_64 Intel(R) Core(TM)2 Duo CPU T7100 @ 1.80GHz
Timestamp of tree: Thu, 17 Jan 2008 17:48:01 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo http://mirror.gentoo.no"
LANG="en_US.UTF-8"
LINGUAS="nb_NO nb en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion berkdb bitmap-fonts blas bluetooth bzip2 caps cddb cdr cli cracklib crypt curl curlwrappers dbm dedicated dga doc dri dts dv dvd dvdr dvdread encode enscript examples exif expat ffmpeg fftw firefox flac flatfile fortran ftp gcj gd gdbm geoip gif gimp glut gmp gnuplot gnutls graphviz gsl iconv icq idn ieee1394 imagemagick imap imlib ipv6 isdnlog java javascript jbig jpeg jpeg2k ladspa lame lapack lash latex lcms libcaca libgda libnotify libsamplerate lm_sensors lzo mad maildir matroska matrox mbox mhash midi mikmod mime mmap mmx mng modplug mozilla mp3 mpeg msn mudflap musepack ncurses netcdf nls nocd nptl nptlonly nsplugin offensive ogg openal openexr opengl openmp osc oss pam pcmcia pcntl pcre pdf perl plotutils png portaudio posix ppds pppd quicktime raw readline recode reflection samba sasl sdl sharedmem shorten simplexml skey sndfile sockets socks5 sox speex spell sse sse2 ssl subversion svg syslog sysvipc szip tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vhosts vim-syntax vorbis wavpack wifi wmf x264 xattr xcb xcomposite xine xml xmlrpc xorg xpm xscreensaver xsl xv xvid yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nb_NO nb en en_US" USERLAND="GNU" VIDEO_CARDS="vesa nv nvidia fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Dell Latitude D630 DSDT
Top
JeliJami
Veteran
Veteran
User avatar
Posts: 1086
Joined: Tue Jan 17, 2006 11:22 am
Location: Belgium

  • Quote

Post by JeliJami » Fri Jan 18, 2008 12:12 pm

Is SHM support enabled in your kernel?

Code: Select all

$ zgrep SHM /proc/config.gz 
CONFIG_SHMEM=y
# CONFIG_TINY_SHMEM is not set
Unanswered Post Initiative | Search | FAQ
Former username: davjel
Top
dev_zero
n00b
n00b
User avatar
Posts: 28
Joined: Thu Nov 01, 2007 8:53 pm
Location: Somewhere in the kernel source

  • Quote

Post by dev_zero » Fri Jan 18, 2008 2:34 pm

Yes, I have compiled with shm tmpfs support. The filesystem is mounted without troubles, but since glibc is compiled without _POSIX_MAPPED_FILES defined it uses empty implementations of the shm functions like shm_open. So basicly my system has support for shm tmpfs but since glibc is compiled without the proper implemented functions it's unusable (possibly because of multilib, since that's where all the "clues" stopped when I tried locating where the error is). At least this is what it looks like.
Dell Latitude D630 DSDT
Top
Post Reply

3 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic