2006-09-05 03:58:40 mpg123 compiling error
Tony Li (UNITED STATES)
Message: 12955 I am porting mpg123 into black fin, when compiling it, there is the following error:
/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/3.4.5
/../../../../bfin-uclinux/bin/ld.real: : No such file: No such file or directory
collect2: ld returned 1 exit status
Anyone has any idea on it.
QuoteReplyEditDelete
2006-09-05 05:36:40 mpg123 compiling error
Roy Huang (CHINA)
Message: 12959 Do you think the mp3play in uClinux cannot meet your requirement?
QuoteReplyEditDelete
2006-09-05 07:07:51 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 12960 i would work on mpg321 instead of mpg123
QuoteReplyEditDelete
2010-08-02 16:44:28 RE: mpg123 compiling error
Rob Maris (GERMANY)
Message: 92065
... Indeed, that's correct.
I'm attempting to build mpg321 as part of the distro (have temporarily added dir_y += mpg321 to user/ Makefile).
make successfully performs configure, at least libmad and other dependencies are recognized. I used the Makefile from madplay as a template. A directory build-mpg321... was created correctly.
As I encounterd once before while having mpd compile problems, here also problems with assembly instructions due to -I/usr/include arise.
I tried including the libao patch for mpd, but this didn't help. configure.log shows a lot of -I/usr/include/, but I don't know how to get configure right. Please assist...
I have attached config.log.
config.log
QuoteReplyEditDelete
2010-08-02 17:21:38 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 92066
the libao patch used with mpd seems to work fine for mpg321 for me
the mpg321 ao.c file does require a newer version of libao than is currently in the dist, but commenting out one line seems to resolve that issue.
QuoteReplyEditDelete
2010-08-02 18:32:00 RE: mpg123 compiling error
Rob Maris (GERMANY)
Message: 92067
Regarding the libao patch: I did not perform the patch correctly. Then I outcommented the appropriate line as indicated by you and I put a vfork #define, dependent on __uClinux (however: actually _BFIN_ is used).
Runtime call of mpg321 needs libao selected in config.
Then runtime test is going wrong:
root:~/mp3> mpg321 -v -t MuppetThemeMono.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.2.12-1 (2010/07/01). Written and copyrights by Joe Drew,
now maintained by Nanakos Chrysostomos and others.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
MuppetThemeMono.mp3: No such device
MuppetThemeMono.mp3: No such device
-t is test option without audio output, should do always, I'd imagine. -d alsa yields the same result.
The player, as apt-get'ed in Ubuntu is operating OK.
QuoteReplyEditDelete
2010-08-02 18:48:23 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 92068
i would strace it to see what device it is complaining about
QuoteReplyEditDelete
2010-08-02 19:18:27 RE: mpg123 compiling error
Rob Maris (GERMANY)
Message: 92069
I have (meanwhile) also compiled 0.2.10, where no source code modifications are needed (it is the verion coming with Ubuntu).
The crucial section seems here:
... gettimeofday({1167609767, 344000}, NULL) = 0
write(2, "High Performance MPEG 1.0/2.0/2.5"..., 259High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
) = 259
rt_sigaction(SIGINT, {SIG_DFL, [INT], SA_RESTART}, {SIG_DFL, [], 0}, 8) = 0
open("MuppetThemeMono.mp3", O_RDONLY) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7ddb78) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
_llseek(3, -128, [430578], SEEK_END) = 0
_llseek(3, 0, [430578], SEEK_CUR) = 0
read(3, "X}c?tm\315o\377{"..., 10) = 10
_llseek(3, 430578, [430578], SEEK_SET) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
_llseek(3, 0, [0], SEEK_CUR) = 0
read(3, "\377\373P\304\0\3\300\0\1\244"..., 10) = 10
_llseek(3, 0, [0], SEEK_SET) = 0
_llseek(3, -10, [430696], SEEK_END) = 0
_llseek(3, 0, [430696], SEEK_CUR) = 0
read(3, "\330\267\233\275w\362G\356=&"..., 10) = 10
_llseek(3, 430696, [430696], SEEK_SET) = 0
_llseek(3, 0, [0], SEEK_SET) = 0
close(3) = 0
open("MuppetThemeMono.mp3", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=430706, ...}) = 0
open("MuppetThemeMono.mp3", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0755, st_size=430706, ...}) = 0
lseek(4, -128, SEEK_END) = 430578
read(4, "X}c"..., 3) = 3
mmap2(NULL, 430706, PROT_READ, MAP_SHARED, 4, 0) = -1 ENODEV (No such device)
write(2, "MuppetThemeMono.mp3"..., 19MuppetThemeMono.mp3) = 19
write(2, ": "..., 2: ) = 2
write(2, "No such device"..., 14No such device) = 14
write(2, "\n"..., 1
) = 1
close(4) = 0
I'm not sure whether the ioctl posesses the basic problem (this is compiled with an earlier trunk version 2.6.28.9, which shouldn't matter.
The full output is attached, with the ubuntu desktop output as possible comparison
strace0.2.10
strace0.2.10ubuntu
QuoteReplyEditDelete
2010-08-02 19:29:18 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 92070
you cant use MAP_SHARED with mmap()
QuoteReplyEditDelete
2010-08-02 19:50:15 RE: mpg123 compiling error
Rob Maris (GERMANY)
Message: 92071
I have read a bit documentation regarding mmap - buffers file in memory - and have replaced all two occurrences (in mad.c and mpg321.c) by MAP_PRIVATE.
Now the player is working (immediately returned to 0.2.12-2 again)! Much thanks! Next I'm going to explore the interactive capabilities of this player.
I'm not sure whether MAP_PRIVATE should be used only in non-MMU systems. I'd ask you to check "this and that" and then push it onto SVN. I can also upload a tar of my mpg321 directory, if desired. When done, I'll write a blackfin docs page.
QuoteReplyEditDelete
2010-08-02 20:54:27 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 92073
the rules for mmap and MAP_SHARED is complicated. it's covered in the docs. but wrt writable files like this, about your only choice is MAP_PRIVATE.
QuoteReplyEditDelete
2010-08-04 14:49:49 RE: mpg123 compiling error
Rob Maris (GERMANY)
Message: 92153
Info:
Meanwhile I could successfully update & build libao to 1.0.0 from xiph.org into my local trunk, yielding a libao.so.4 (instead of .2). Perhaps an SVN update makes sense.
The single libao-related outcommenting in the source could be undone, now.
A final problem is present in using mpg321: slow terminate upon ctrl-C (approx. 2 seconds) as well as "pause" via stdin control. This is apparently related to libao and I'm currently reviewing this behaviou with the maintainer of mpg321. The odd behaviour is not apparent on e.g. a linux desktop target.
QuoteReplyEditDelete
2010-08-04 15:15:11 RE: mpg123 compiling error
Mike Frysinger (UNITED STATES)
Message: 92154
ive been avoiding package updates in general in uclinux-dist trunk until after we branch 2010R1