OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: renick on August 10, 2007, 04:09:01 am

Title: Compiling Apps On Current Pdaxii13 Akita
Post by: renick on August 10, 2007, 04:09:01 am
I have questions about setting up pdaxii13 for compiling apps natively.

I am running into problems compiling the wmii window manager, which I mention in this thread:

https://www.oesf.org/forums/index.php?showt...=0&#entry166021 (https://www.oesf.org/forums/index.php?showtopic=24516&pid=166021&mode=threaded&show=&st=0&#entry166021)

I think part of the problem may be similar to that described in this thread:

https://www.oesf.org/forums/index.php?showt...st=&#entry86574 (https://www.oesf.org/forums/index.php?showtopic=12918&pid=86574&mode=threaded&show=&st=&#entry86574)

I can compile some things, such as GNU screen (I couldn't get either of the two packages I found in feeds to work). However, wmii is failing because, as it was described to me, it can't find libc. I know the sources are good because I compiled them without trouble on two laptops.

The second link above talks about creating some symbolic links to various files. Could someone explain this in more detail than the above thread or point me to some more detailed documentation on how to do this?

I should add that I'm using zgcc-3.4.6.squashfs in /data mounted to /opt/native/arm/3.4.6-xscale-softvfp.
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: pelrun on August 10, 2007, 04:21:37 am
That's odd - strictly speaking, "-lc" shouldn't even be passed explicitly as it's automatically included. Try deleting it from the config.mk file and recompiling.
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: adf on August 10, 2007, 04:32:51 am
The 28 meg or the 40 meg zgcc?  If I recall correctly, there were some issues with one of the versions--I don't remember which, but do remeber there was some discussion a month or so ago..
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: renick on August 10, 2007, 10:32:35 am
Quote
The 28 meg or the 40 meg zgcc?  If I recall correctly, there were some issues with one of the versions--I don't remember which, but do remeber there was some discussion a month or so ago..
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166033\"][{POST_SNAPBACK}][/a][/div]

It's the 40 mb one. I'll try to hunt down that thread and take a look.
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: renick on August 10, 2007, 10:35:58 am
Quote
That's odd - strictly speaking, "-lc" shouldn't even be passed explicitly as it's automatically included. Try deleting it from the config.mk file and recompiling.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166031\"][{POST_SNAPBACK}][/a][/div]

Thanks for the suggestion, but it didn't make any difference. The same error resulted.
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: Meanie on August 11, 2007, 05:37:49 am
Quote
Quote
That's odd - strictly speaking, "-lc" shouldn't even be passed explicitly as it's automatically included. Try deleting it from the config.mk file and recompiling.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166031\"][{POST_SNAPBACK}][/a][/div]

Thanks for the suggestion, but it didn't make any difference. The same error resulted.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166046\"][{POST_SNAPBACK}][/a][/div]

did you also rerun configure again after that before you started recompiling?
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: renick on August 11, 2007, 07:47:48 am
Quote
Quote
Quote
That's odd - strictly speaking, "-lc" shouldn't even be passed explicitly as it's automatically included. Try deleting it from the config.mk file and recompiling.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166031\"][{POST_SNAPBACK}][/a][/div]

Thanks for the suggestion, but it didn't make any difference. The same error resulted.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166046\"][{POST_SNAPBACK}][/a][/div]

did you also rerun configure again after that before you started recompiling?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166079\"][{POST_SNAPBACK}][/a][/div]

Thanks a lot for your attention to my problem.

There's no configure for wmii. The readme just says run make and then make install after editing the config.mk file. I ditched the unpacked tar, reunpacked it, and then removed -lc from this line:

Code: [Select]
# Includes and libs
INCS = -I. -I${ROOT}/include -I${INCLUDE} -I/usr/include
LIBS = -L/usr/lib -lc

so that it read:

Code: [Select]
LIBS = -L/usr/lib
Then I ran make. The process began again from the very beginning, like before, and resulted in the exact same error.

Now, I'll admit that I don't really know what I am doing. I've barely started to learn C, so this is all over my head. Have I edited the line incorrectly? I suppose another possibility is that there's something else in config.mk that I haven't configured correctly. Here's the whole file:

Code: [Select]
# Customize below to fit your system

# paths
PREFIX = /usr/local
BIN = ${PREFIX}/bin
MAN = ${PREFIX}/share/man
ETC = ${PREFIX}/etc
LIBDIR = ${PREFIX}/lib
INCLUDE = ${PREFIX}/include

# Includes and libs
INCS = -I. -I${ROOT}/include -I${INCLUDE} -I/usr/include
LIBS = -L/usr/lib

# Flags
include ${ROOT}/mk/gcc.mk
# wmii is IO bound, not CPU bound. Please do not use -O2 here. -O is more than sufficient.
CFLAGS +=
LDFLAGS +=
STATIC = -static

# Compiler
CC = cc -c
# Linker (Under normal circumstances, this should *not* be 'ld')
LD = cc
# Other
AR = ar crs
#AR = sh -c 'ar cr "$$@" && ranlib "$$@"'

P9PATHS = /usr/local/plan9 /usr/local/9 /opt/plan9 /opt/9 /usr/plan9 /usr/9

INCX11 = -I/usr/X11R6/include
LIBX11 = -L/usr/X11R6/lib -lX11
LIBIXP = ${ROOT}/libixp/libixp.a

# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS} -R${PREFIX}/lib
#LDFLAGS += -lsocket -lnsl
#CFLAGS += -xtarget=ultra
#FCALL_H_VERSION=.nounion
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: Meanie on August 11, 2007, 08:20:45 am
Quote
Quote
Quote
Quote
That's odd - strictly speaking, "-lc" shouldn't even be passed explicitly as it's automatically included. Try deleting it from the config.mk file and recompiling.
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=166031\")

Thanks for the suggestion, but it didn't make any difference. The same error resulted.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166046\"][{POST_SNAPBACK}][/a][/div]

did you also rerun configure again after that before you started recompiling?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166079\"][{POST_SNAPBACK}][/a][/div]

Thanks a lot for your attention to my problem.

There's no configure for wmii. The readme just says run make and then make install after editing the config.mk file. I ditched the unpacked tar, reunpacked it, and then removed -lc from this line:

Code: [Select]
# Includes and libs
INCS = -I. -I${ROOT}/include -I${INCLUDE} -I/usr/include
LIBS = -L/usr/lib -lc

so that it read:

Code: [Select]
LIBS = -L/usr/lib
Then I ran make. The process began again from the very beginning, like before, and resulted in the exact same error.

Now, I'll admit that I don't really know what I am doing. I've barely started to learn C, so this is all over my head. Have I edited the line incorrectly? I suppose another possibility is that there's something else in config.mk that I haven't configured correctly. Here's the whole file:

Code: [Select]
# Customize below to fit your system

# paths
PREFIX = /usr/local
BIN = ${PREFIX}/bin
MAN = ${PREFIX}/share/man
ETC = ${PREFIX}/etc
LIBDIR = ${PREFIX}/lib
INCLUDE = ${PREFIX}/include

# Includes and libs
INCS = -I. -I${ROOT}/include -I${INCLUDE} -I/usr/include
LIBS = -L/usr/lib

# Flags
include ${ROOT}/mk/gcc.mk
# wmii is IO bound, not CPU bound. Please do not use -O2 here. -O is more than sufficient.
CFLAGS +=
LDFLAGS +=
STATIC = -static

# Compiler
CC = cc -c
# Linker (Under normal circumstances, this should *not* be 'ld')
LD = cc
# Other
AR = ar crs
#AR = sh -c 'ar cr "$$@" && ranlib "$$@"'

P9PATHS = /usr/local/plan9 /usr/local/9 /opt/plan9 /opt/9 /usr/plan9 /usr/9

INCX11 = -I/usr/X11R6/include
LIBX11 = -L/usr/X11R6/lib -lX11
LIBIXP = ${ROOT}/libixp/libixp.a

# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS} -R${PREFIX}/lib
#LDFLAGS += -lsocket -lnsl
#CFLAGS += -xtarget=ultra
#FCALL_H_VERSION=.nounion
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166081\"][{POST_SNAPBACK}][/a][/div]


actually, which version are you trying to compile?
i just tried to compile the following [a href=\"http://suckless.org/download/wmii-3.1.tar.gz]http://suckless.org/download/wmii-3.1.tar.gz[/url]
and it worked without any problems.

i think the -static is the culprit. just remove it and try again or download the source i used which compiled without any problems.
Title: Compiling Apps On Current Pdaxii13 Akita
Post by: renick on August 13, 2007, 06:01:35 am
Quote
i think the -static is the culprit. just remove it and try again or download the source i used which compiled without any problems.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=166083\"][{POST_SNAPBACK}][/a][/div]

Thank you! Eliminating that allowed the latest snapshot to compile and run without segfaults or anything (at least, not yet). I'm glad to know there aren't really problems with compiling. I've now compiled screen, wmii, dwm, htop, abook, worker, and others without trouble.

As an aside, there ought to be packages for several of those things above. Maybe I'm missing a console fan's feed...