=^.^=

Portage Errors: dev-libs/libaio final link failed: Nonrepresentable section on output

karma

You may encounter output similar to this when compiling libaio (a dependency of multipath-tools) if you have enabled Stack Smashing Protection in your CFLAGS:

io_getevents.os:io_getevents.c:(.text+0xe1): more undefined references to `__stack_chk_fail_local' follow
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: libaio.so.1.0.1: hidden symbol `__stack_chk_fail_local' isn't defined
/usr/lib/gcc/i686-pc-linux-gnu/4.4.3/../../../../i686-pc-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[1]: *** [libaio.so.1.0.1] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/libaio-0.3.107/work/libaio-0.3.107/src'
make: *** [all] Error 2
emake failed
 * ERROR: dev-libs/libaio-0.3.107 failed (compile phase):
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 2120:  Called _eapi2_src_compile
 *     ebuild.sh, line  665:  Called die
 * The specific snippet of code:
 *              emake || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-libs/libaio-0.3.107',
 * the complete build log and the output of 'emerge -pqv =dev-libs/libaio-0.3.107'.
 * The complete build log is located at '/var/tmp/portage/dev-libs/libaio-0.3.107/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/libaio-0.3.107/temp/environment'.
 * S: '/var/tmp/portage/dev-libs/libaio-0.3.107/work/libaio-0.3.107'

>>> Failed to emerge dev-libs/libaio-0.3.107

To remedy, temporarily remove any and all the following from your CFLAGS and recompile:

-fstack-protector -fPIE -fPIC

Fun with Vapour Part Two: Great News from the United States

karma

From http://www.huffingtonpost.com/2011/04/26/e-cigarettes_n_853828.html:

RICHMOND, Va. -- The Food and Drug Administration said Monday that it plans to regulate smokeless electronic cigarettes as tobacco products and won't try to regulate them under stricter rules for drug-delivery devices.

The federal agency said in a letter to stakeholders Monday that it intends to propose rule changes to treat e-cigarettes the same as traditional cigarettes and other tobacco products.

The news is considered a victory for makers and distributors of the devices, which continue to gain popularity worldwide.

E-cigarettes are plastic and metal devices that heat a liquid nicotine solution in a disposable cartridge, creating vapor that the "smoker" inhales. A tiny light on the tip even glows like a real cigarette.

Users and distributors say e-cigarettes address both the nicotine addiction and the behavioral aspects of smoking – the holding of the cigarette, the puffing, seeing the smoke come out and the hand motion – without the more than 4,000 chemicals found in cigarettes.

First marketed overseas in 2002, e-cigarettes didn't become easily available in the U.S. until late 2006. Now, the industry has grown from the thousands of users in 2006 to several million worldwide, with tens of thousands new e-smokers every week.

No timeline has been set on the proposed rule changes.

The FDA said e-cigarettes could still be regulated as drugs or drug-delivery devices if they are "marketed for therapeutic purposes," – for example, as a stop-smoking aid.

Craig Weiss, president of Sottera Inc., the Arizona-based company involved in the lawsuit that led to the FDA's decision on Monday, said he was "very happy" with the agency's decision. The company markets NJOY brand e-cigarettes.

Jason Healy, president of e-cigarette maker Blu Cigs, also praised the decision. Once the FDA's rules covering e-cigarettes are in place, he said, they will help in "weeding out the shady companies."

Right now, "you can potentially sell snake oil," Healy said.

Some e-cigarette makers have claimed the products will help smokers quit using traditional cigarettes, while other manufacturers have tried to steer clear of the issue.

Nearly 46 million Americans smoke cigarettes. About 40 percent try to quit each year, according to the Centers for Disease Control and Prevention. But unlike nicotine patches or gums, e-smokes have operated in a legal gray area.

The FDA lost a court case last year after trying to treat e-cigarettes as drug-delivery devices, rather than tobacco products. A federal appeals court ruled electronic cigarettes should be regulated as tobacco products rather than as drug-delivery devices, which must satisfy more stringent requirements such as expensive clinical trials to prove they're safe and effective. The FDA had until Monday to appeal to the U.S. Supreme Court.

Meanwhile, the agency issued warning letters last year to several makers of e-cigarettes and their components, saying the companies' health claims and manufacturing practices broke the law.

Those companies were not a part of the lawsuit, which was filed in 2009 after the FDA told customs officials to refuse entry of shipments into the U.S.

The FDA has said its tests found that the liquid in some electronic cigarettes contained toxins besides nicotine – which is toxic in large doses – as well as carcinogens that occur naturally in tobacco.

But some public health experts say the level of those carcinogens was comparable to those found in nicotine replacement therapy, because the nicotine in all of the products is extracted from tobacco.

If history is an indicator this may help set the ball rolling for Health Canada. Fingers crossed! On the bright side, we will have the benefit of the FDA's judgement until then.

Portage Errors: cc1: out of memory

karma

This condition occurs when the compiler requires more memory than is currently available. It is not unusual for SSH sessions to drop when an out of memory error occurs, as you can tell from the output in this VM's dmesg:

Out of Memory: Kill process 3268 (sshd) score 2295 and children.
Out of memory: Killed process 3269 (bash).

If you can't afford to take the machine down to add more memory and you have no space to create a swap partition simply add a swap file to temporarily boost the amount of virtual memory available. Replace 128 with the desired size of your swap file:

# cd /
# dd if=/dev/zero of=./swap.img bs=1M count=128
# mkswap swap.img
# swapon swap.img

Once you've finished, disable the swap file and delete it:

# swapoff /swap.img
# rm /swap.img

I tend to have to do this a lot on my more resource-constricted VMs when I recompile gcc. It has been my experience that you should have at least 300MB of free memory to work with and that's often too much to justify permanently assigning to smaller VMs which can easily run in 128MB.

Portage Errors: libselinux and libsemanage won't emerge with Python 3.x

karma

You may encounter this problem with libselinux and libsemanage when attempting to compile them while Python 3x is set as the default interpreter.

make PYLIBVER=python3.1 pywrap 
make -C src pywrap
make[1]: Entering directory `/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27/src'
cc -O2 -march=i686 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs -fstack-protector-all -I../include -I/usr/include -D_GNU_SOURCE -I/usr/include/python3.1 -fPIC -DSHARED -c -o semanageswig_wrap.lo semanageswig_wrap.c
semanageswig_wrap.c: In function 'PySwigObject_format':
semanageswig_wrap.c:1319: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c:1321: warning: assignment makes pointer from integer without a cast
semanageswig_wrap.c: In function 'PySwigObject_repr':
semanageswig_wrap.c:1351: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c: In function 'PySwigObject_print':
semanageswig_wrap.c:1373: warning: passing argument 1 of 'fputs' makes pointer from integer without a cast
/usr/include/stdio.h:662: note: expected 'const char * __restrict__' but argument is of type 'int'
semanageswig_wrap.c: In function 'PySwigObject_str':
semanageswig_wrap.c:1386: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function '_PySwigObject_type':
semanageswig_wrap.c:1582: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1583: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1586: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1587: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1594: error: 'coercion' undeclared (first use in this function)
semanageswig_wrap.c:1594: error: (Each undeclared identifier is reported only once
semanageswig_wrap.c:1594: error: for each function it appears in.)
semanageswig_wrap.c:1594: error: expected '}' before numeric constant
semanageswig_wrap.c:1616: warning: initialization makes integer from pointer without a cast
semanageswig_wrap.c:1619: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1620: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1624: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1627: error: 'cmpfunc' undeclared (first use in this function)
semanageswig_wrap.c:1627: error: expected '}' before 'PySwigObject_compare'
semanageswig_wrap.c:1674: error: 'PyTypeObject' has no member named 'ob_type'
semanageswig_wrap.c: In function 'PySwigPacked_repr':
semanageswig_wrap.c:1723: warning: return makes pointer from integer without a cast
semanageswig_wrap.c:1725: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function 'PySwigPacked_str':
semanageswig_wrap.c:1734: warning: return makes pointer from integer without a cast
semanageswig_wrap.c:1736: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function '_PySwigPacked_type':
semanageswig_wrap.c:1783: warning: initialization makes integer from pointer without a cast
semanageswig_wrap.c:1786: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1787: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1788: warning: initialization from incompatible pointer type
semanageswig_wrap.c:1790: error: 'cmpfunc' undeclared (first use in this function)
semanageswig_wrap.c:1790: error: expected '}' before 'PySwigPacked_compare'
semanageswig_wrap.c:1837: error: 'PyTypeObject' has no member named 'ob_type'
semanageswig_wrap.c: In function '_SWIG_This':
semanageswig_wrap.c:1882: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_Python_GetSwigThis':
semanageswig_wrap.c:1903: warning: assignment makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_Python_NewShadowInstance':
semanageswig_wrap.c:2117: warning: assignment makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_Python_SetModule':
semanageswig_wrap.c:2299: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_Python_TypeQuery':
semanageswig_wrap.c:2319: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_Python_TypeError':
semanageswig_wrap.c:2408: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_From_int':
semanageswig_wrap.c:2554: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_FromCharPtrAndSize':
semanageswig_wrap.c:2580: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function 'SWIG_AsCharPtrAndSize':
semanageswig_wrap.c:2626: warning: assignment makes pointer from integer without a cast
semanageswig_wrap.c: In function 'swig_varlink_repr':
semanageswig_wrap.c:12117: warning: return makes pointer from integer without a cast
semanageswig_wrap.c: In function 'swig_varlink_str':
semanageswig_wrap.c:12122: warning: initialization makes pointer from integer without a cast
semanageswig_wrap.c: In function 'swig_varlink_print':
semanageswig_wrap.c:12136: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
semanageswig_wrap.c: In function 'swig_varlink_type':
semanageswig_wrap.c:12196: warning: initialization makes integer from pointer without a cast
semanageswig_wrap.c:12199: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12200: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12201: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12204: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12210: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12215: warning: initialization from incompatible pointer type
semanageswig_wrap.c:12231: error: 'PyTypeObject' has no member named 'ob_type'
semanageswig_wrap.c: In function 'init_semanage':
semanageswig_wrap.c:12362: warning: assignment makes pointer from integer without a cast
make[1]: *** [semanageswig_wrap.lo] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27/src'
make: *** [pywrap] Error 2
emake failed
 * ERROR: sys-libs/libsemanage-2.0.27 failed (compile phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  56:  Called src_compile
 *   environment, line 4388:  Called die
 * The specific snippet of code:
 *       emake PYLIBVER="python$(python_get_version)" pywrap || die
 * 
 * If you need support, post the output of 'emerge --info =sys-libs/libsemanage-2.0.27',
 * the complete build log and the output of 'emerge -pqv =sys-libs/libsemanage-2.0.27'.
 * The complete build log is located at '/var/tmp/portage/sys-libs/libsemanage-2.0.27/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/libsemanage-2.0.27/temp/environment'.
 * S: '/var/tmp/portage/sys-libs/libsemanage-2.0.27/work/libsemanage-2.0.27'

>>> Failed to emerge sys-libs/libsemanage-2.0.27

To work around:

# eselect python list
Available Python interpreters:
  [1]   python2.6
  [2]   python3.1 *
# eselect python set 1
# emerge libselinux libsemanage

The drawback to this workaround is as soon as you change the default interpreter back to 3.x these packages will be picked up by python-updater.

Portage Errors: gcc-config: error: could not run/locate 'gcc'

karma

This problem crops up when the active version of gcc has been removed (i.e. through emerge --depclean) before a different one has been selected.

>>> Emerging (1 of 2) sys-libs/libselinux-2.0.71
* libselinux-2.0.71.tar.gz RMD160 SHA1 SHA256 size ;-) ...                           [ ok ]
* Package:    sys-libs/libselinux-2.0.71
* Repository: gentoo
* Maintainer: [email protected]
* USE:        elibc_glibc kernel_linux selinux userland_GNU x86
* FEATURES:   sandbox selinux sesandbox
>>> Unpacking source...
>>> Unpacking libselinux-2.0.71.tar.gz to /var/tmp/portage/sys-libs/libselinux-2.0.71/work
>>> Source unpacked in /var/tmp/portage/sys-libs/libselinux-2.0.71/work
>>> Compiling source in /var/tmp/portage/sys-libs/libselinux-2.0.71/work/libselinux-2.0.71 ...
make 'LDFLAGS=-fPIC -Wl,-O1 -Wl,--as-needed' all
make -C src
make[1]: Entering directory `/var/tmp/portage/sys-libs/libselinux-2.0.71/work/libselinux-2.0.71/src'
cc -O2 -march=i686 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs -fstack-protector-all -I../include -I/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -mno-tls-direct-seg-refs -c -o avc.o vc.c
gcc-config: error: could not run/locate 'gcc'
make[1]: *** [avc.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-libs/libselinux-2.0.71/work/libselinux-2.0.71/src'
make: *** [all] Error 2
emake failed
* ERROR: sys-libs/libselinux-2.0.71 failed (compile phase):
*   (no error message)
*
* Call stack:
*     ebuild.sh, line  56:  Called src_compile
*   environment, line 4561:  Called die
* The specific snippet of code:
*       emake LDFLAGS="-fPIC ${LDFLAGS}" all || die;
*
* If you need support, post the output of 'emerge --info =sys-libs/libselinux-2.0.71',
* the complete build log and the output of 'emerge -pqv =sys-libs/libselinux-2.0.71'.
* The complete build log is located at '/var/tmp/portage/sys-libs/libselinux-2.0.71/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-libs/libselinux-2.0.71/temp/environment'.
* S: '/var/tmp/portage/sys-libs/libselinux-2.0.71/work/libselinux-2.0.71'
 
>>> Failed to emerge sys-libs/libselinux-2.0.71

Use gcc-config to list the currently installed versions of gcc on your system:

# gcc-config -l
 [1] x86_64-pc-linux-gnu-3.4.6
 [2] x86_64-pc-linux-gnu-3.4.6-hardened
 [3] x86_64-pc-linux-gnu-3.4.6-hardenednopie
 [4] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
 [5] x86_64-pc-linux-gnu-3.4.6-hardenednossp
 [6] x86_64-pc-linux-gnu-4.4.5

To fix: select the latest or most appropriate version, replacing number with its lists number:

# gcc-config number
# source /etc/profile