LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-24-2014, 06:26 AM   #1
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Rep: Reputation: 13
compile serf 1.3.3 (useful for subversion 1.8.5) with readonly /tmp


I try to compile serf 1.3.3 on Zyxel NSA310 but I'm failing:
Code:
root@nsa310:~/compile/serf-1.3.3-build# scons APR=/ffp APU=/ffp OPENSSL=/ffp PREFIX=/ffp/opt/serf-1.3.3 CC=/ffp/bin/gcc DEBUG=yes -Y /ffp/home/root/compile/serf-1.3.3
/ffp/bin/python: symbol 'BC': can't resolve symbol
/ffp/bin/python: symbol 'PC': can't resolve symbol
/ffp/bin/python: symbol 'UP': can't resolve symbol
/ffp/bin/python: symbol 'tgetnum': can't resolve symbol
/ffp/bin/python: symbol 'tgoto': can't resolve symbol
/ffp/bin/python: symbol 'tgetflag': can't resolve symbol
/ffp/bin/python: symbol 'tputs': can't resolve symbol
/ffp/bin/python: symbol 'tgetent': can't resolve symbol
/ffp/bin/python: symbol 'tgetstr': can't resolve symbol
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
/ffp/bin/gcc -o context.o -c -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -g -pthread -DDEBUG -D_DEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I. -I/ffp/home/root/compile/serf-1.3.3 -I/ffp/include/apr-1 -I/ffp/include /ffp/home/root/compile/serf-1.3.3/context.c
gcc: error trying to exec 'as': execvp: No such file or directory
scons: *** [context.o] Error 1
scons: building terminated because of errors.
The problem is with /tmp directory (readonly for me) which is used for gcc instead of any of the environment vars: TMPDIR, TEMP, TMP.
I have this environement:
Code:
root@nsa310:~# uname -a
Linux nsa310 2.6.31.8 #2 Fri Aug 2 11:21:44 CST 2013 armv5tel GNU/Linux

HOME=/ffp/home/root
PATH=/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin:/ffp/opt/jdk1.8.0-full-cli/bin
TMPDIR=/usr/local/zy-pkgs/ffproot/ffp/tmp
TMP=/usr/local/zy-pkgs/ffproot/ffp/tmp
TEMP=/usr/local/zy-pkgs/ffproot/ffp/tmp
When executing the gcc command by myself this force gcc to use TMPDIR or TEMP or TMP and everything is ok (context.o is produced):
Code:
/ffp/bin/gcc -o context.o -c -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -g -pthread -DDEBUG -D_DEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I. -I/usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3 -I/ffp/include/apr-1 -I/ffp/include /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3/context.c
But then when I try to execute again the initial scons command it fails again with same error; I thought that would discover the context.o file and will go on:
Code:
root@nsa310:~/compile/serf-1.3.3-build# scons APR=/ffp APU=/ffp OPENSSL=/ffp PREFIX=/ffp/opt/serf-1.3.3 CC=/ffp/bin/gcc DEBUG=yes -Y /ffp/home/root/compile/serf-1.3.3
What should I do ?

PS: the below happens when executing gcc without having TMP, TEMP and TMPDIR; please see the line as -mfloat-abi=soft -meabi=5 -o context.o /tmp/ccJ6fqXa.s
Code:
root@nsa310:~# /ffp/bin/gcc -o context.o -c -std=c89 -Wdeclaration-after-statement -Wmissing-prototypes -Wall -g -pthread -DDEBUG -D_DEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I. -I/usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3 -I/ffp/include/apr-1 -I/ffp/include -v /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3/context.c
Using built-in specs.
COLLECT_GCC=/ffp/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/zy-pkgs/ffproot/ffp/bin/../libexec/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/lto-wrapper
Target: arm-ffp-linux-uclibcgnueabi
Configured with: ../gcc-4.6.2/configure --prefix=/ffp --with-local-prefix=/ffp --build=arm-ffp-linux-uclibcgnueabi --host=arm-ffp-linux-uclibcgnueabi --disable-nls --enable-shared --enable-languages=c,c++ --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-threads=posix --disable-multilib --with-system-zlib --enable-checking=release --with-float=soft
Thread model: posix
gcc version 4.6.2 (GCC)
COLLECT_GCC_OPTIONS='-o' 'context.o' '-c' '-std=c90' '-Wdeclaration-after-statement' '-Wmissing-prototypes' '-Wall' '-g' '-pthread' '-D' 'DEBUG' '-D' '_DEBUG' '-D' 'LINUX' '-D' '_REENTRANT' '-D' '_GNU_SOURCE' '-D' '_LARGEFILE64_SOURCE' '-I' '.' '-I' '/usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3' '-I' '/ffp/include/apr-1' '-I' '/ffp/include' '-v' '-mfloat-abi=soft'
 /usr/local/zy-pkgs/ffproot/ffp/bin/../libexec/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/cc1 -quiet -v -I . -I /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3 -I /ffp/include/apr-1 -I /ffp/include -iprefix /usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/ -D_REENTRANT -D DEBUG -D _DEBUG -D LINUX -D _REENTRANT -D _GNU_SOURCE -D _LARGEFILE64_SOURCE /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3/context.c -quiet -dumpbase context.c -mfloat-abi=soft -auxbase-strip context.o -g -Wdeclaration-after-statement -Wmissing-prototypes -Wall -std=c90 -version -o /tmp/ccJ6fqXa.s
GNU C (GCC) version 4.6.2 (arm-ffp-linux-uclibcgnueabi)
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/../../../../arm-ffp-linux-uclibcgnueabi/include"
ignoring duplicate directory "/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/../../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/include"
ignoring duplicate directory "/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/../../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/include-fixed"
ignoring nonexistent directory "/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/../../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/../../../../arm-ffp-linux-uclibcgnueabi/include"
ignoring duplicate directory "/ffp/include/"
ignoring duplicate directory "/ffp/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3
 /ffp/include/apr-1
 /usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/include
 /usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/include-fixed
 /ffp/include
End of search list.
GNU C (GCC) version 4.6.2 (arm-ffp-linux-uclibcgnueabi)
        compiled by GNU C version 4.6.2, GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ca6306324b14eb2bf7ddfeb74bf1a155
COLLECT_GCC_OPTIONS='-o' 'context.o' '-c' '-std=c90' '-Wdeclaration-after-statement' '-Wmissing-prototypes' '-Wall' '-g' '-pthread' '-D' 'DEBUG' '-D' '_DEBUG' '-D' 'LINUX' '-D' '_REENTRANT' '-D' '_GNU_SOURCE' '-D' '_LARGEFILE64_SOURCE' '-I' '.' '-I' '/usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3' '-I' '/ffp/include/apr-1' '-I' '/ffp/include' '-v' '-mfloat-abi=soft'
 as -mfloat-abi=soft -meabi=5 -o context.o /tmp/ccJ6fqXa.s
COMPILER_PATH=/usr/local/zy-pkgs/ffproot/ffp/bin/../libexec/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/:/usr/local/zy-pkgs/ffproot/ffp/bin/../libexec/gcc/
LIBRARY_PATH=/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/:/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/:/usr/local/zy-pkgs/ffproot/ffp/bin/../lib/gcc/arm-ffp-linux-uclibcgnueabi/4.6.2/../../../:/ffp/lib/
COLLECT_GCC_OPTIONS='-o' 'context.o' '-c' '-std=c90' '-Wdeclaration-after-statement' '-Wmissing-prototypes' '-Wall' '-g' '-pthread' '-D' 'DEBUG' '-D' '_DEBUG' '-D' 'LINUX' '-D' '_REENTRANT' '-D' '_GNU_SOURCE' '-D' '_LARGEFILE64_SOURCE' '-I' '.' '-I' '/usr/local/zy-pkgs/ffproot/ffp/home/root/compile/serf-1.3.3' '-I' '/ffp/include/apr-1' '-I' '/ffp/include' '-v' '-mfloat-abi=soft'

Last edited by adrhc; 07-24-2014 at 07:04 AM.
 
Old 07-24-2014, 08:13 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,163

Rep: Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381
probably scons overwrites the environment, you need to take care about that (tmp dir) in your SConscript file.
please do not build/compile anything as root, but as a normal user.
 
Old 07-24-2014, 11:39 AM   #3
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
I have a Zyxel NSA310 linux so some dir are readonly and I can use only root.
I did this:
Code:
/ffp/start/zyxel_utils.sh hook /usr/bin -> makes /usr/bin writable :)
cd /usr/bin
ln -s /ffp/bin/as as			
ln -s /ffp/bin/ar ar			
ln -s /ffp/bin/ld ld			
cd ~/compile/serf-1.3.3-build/
scons APR=/ffp APU=/ffp OPENSSL=/ffp PREFIX=/ffp/opt/serf-1.3.3 CC=/ffp/bin/gcc DEBUG=yes -Y /ffp/home/root/compile/serf-1.3.3
It stops here:
Code:
/ffp/bin/gcc -o libserf-1.so.1.3.0 -pthread -shared -Wl,-Bsymbolic -Wl,-soname=libserf-1.so.1 -Wl,-rpath=/ffp/opt/serf-1.3.3/lib -Wl,-rpath=/ffp/lib -Wl,-rpath=/ffp/lib context.os incoming.os outgoing.os ssltunnel.os buckets/aggregate_buckets.os buckets/allocator.os buckets/barrier_buckets.os buckets/buckets.os buckets/bwtp_buckets.os buckets/chunk_buckets.os buckets/dechunk_buckets.os buckets/deflate_buckets.os buckets/file_buckets.os buckets/headers_buckets.os buckets/iovec_buckets.os buckets/limit_buckets.os buckets/mmap_buckets.os buckets/request_buckets.os buckets/response_body_buckets.os buckets/response_buckets.os buckets/simple_buckets.os buckets/socket_buckets.os buckets/ssl_buckets.os auth/auth.os auth/auth_basic.os auth/auth_digest.os auth/auth_spnego.os auth/auth_spnego_gss.os auth/auth_spnego_sspi.os -L/ffp/lib -L/ffp/lib -lssl -lcrypto -lz -lapr-1 -luuid -lrt -lm -lcrypt -lpthread -ldl -laprutil-1 -lexpat -liconv -> this run fine if executing by myself
scons: *** [libserf-1.so.1.3.0] File exists
scons: building terminated because of errors.
What's the problem now ? where could I find a log or something like this to point me the problem ?

The only hint I have is the warnings received before this last error; this is an example of them:
Code:
/ffp/home/root/compile/serf-1.3.3/buckets/bwtp_buckets.c: In function 'serialize_data':
/ffp/home/root/compile/serf-1.3.3/buckets/bwtp_buckets.c:233:28: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'apr_size_t' [-Wformat]
but I learn that apr_size_t is in fact an unsigned int so this shouldn't be a problem.

Last edited by adrhc; 07-24-2014 at 12:06 PM.
 
Old 07-25-2014, 12:06 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,163

Rep: Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381Reputation: 7381
yes, that warning is not important at this moment. The error message means scons tries to write the final result but it already exists. You may try to remove that lib and run the command again.
 
Old 07-28-2014, 03:55 AM   #5
adrhc
Member
 
Registered: Dec 2006
Location: Bucharest
Distribution: Ubuntu 16.04 LTS
Posts: 103

Original Poster
Rep: Reputation: 13
I'm on an arm processor so this is the solution:
File serf-1.3.6/SConstruct:
if sys.platform != 'win32':
### gcc only. figure out appropriate test / better way to check these
### flags, and check for gcc.
env.Append(CFLAGS='-std=c89')
env['ENV']['PATH'] = '/ffp/bin:/ffp/sbin' -> to add
 
  


Reply

Tags
compile error, scons, subversion


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
MPlayer Compile From Subversion tpreitzel Slackware 10 10-16-2011 09:41 PM
Subversion 1.5 mccartjd Linux - Newbie 2 06-26-2008 06:41 AM
subversion varun_33 Linux - Software 1 04-20-2005 12:37 PM
subversion sethgeekx86 Slackware 8 07-26-2004 03:29 PM
How to install Subversion(Version Control with Subversion) under RedHat Linux. netkiller Linux - Networking 1 07-01-2004 05:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:53 PM.

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