Kos-Ports build error

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
Twada
DC Developer
DC Developer
Posts: 42
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Jan 20, 2016 4:55 am
Has thanked: 18 times
Been thanked: 53 times

Kos-Ports build error

Post by Twada »

Hello.

http://www.neogaf.com/forum/showthread.php?t=916501
I built kos according to this article that is put above. That succeeded.
But the error below was made when I built kos-port, and it stopped.

Error Messages:

Code: Select all

Building /home/yello/dc/kos/../kos-ports/libmp3...
make: Entering directory '/home/yello/dc/kos-ports/libmp3'
libmp3 is not currently installed.
Finished processing dependencies for libmp3.
Updating libmp3 from git://git.code.sf.net/p/cadcdev/libmp3 ...
fatal: Unable to look up git.code.sf.net (port 9418) (Name or service not known)
Copying SCM checkout of libmp3 ...
Copying KOS files...
make[1]: Entering directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0'
make -C  xingmp3
make[2]: Entering directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0/xingmp3'
kos-cc -O2 -c cdct.c -o cdct.o
kos-cc -O2 -c csbt.c -o csbt.o
kos-cc -O2 -c cup.c -o cup.o
In file included from cup.c:496:0:
cupini.c: In function ‘mpeg_init’:
cupini.c:217:13: warning: array subscript is above array bounds [-Warray-bounds]
kos-cc -O2 -c cupl3.c -o cupl3.o
kos-cc -O2 -c cwinm.c -o cwinm.o
kos-cc -O2 -c dec8.c -o dec8.o
kos-cc -O2 -c hwin.c -o hwin.o
kos-cc -O2 -c icdct.c -o icdct.o
kos-cc -O2 -c isbt.c -o isbt.o
kos-cc -O2 -c iup.c -o iup.o
In file included from iup.c:527:0:
iupini.c: In function ‘i_mpeg_init’:
iupini.c:193:13: warning: array subscript is above array bounds [-Warray-bounds]
kos-cc -O2 -c iwinm.c -o iwinm.o
kos-cc -O2 -c l3dq.c -o l3dq.o
kos-cc -O2 -c l3init.c -o l3init.o
kos-cc -O2 -c mdct.c -o mdct.o
kos-cc -O2 -c mhead.c -o mhead.o
kos-cc -O2 -c msis.c -o msis.o
kos-cc -O2 -c uph.c -o uph.o
kos-cc -O2 -c upsf.c -o upsf.o
/opt/toolchains/dc/sh-elf/bin/sh-elf-ar rcs libxingmp3.a cdct.o csbt.o cup.o cupl3.o cwinm.o dec8.o hwin.o icdct.o isbt.o iup.o iwinm.o l3dq.o l3init.o mdct.o mhead.o msis.o uph.o upsf.o
cp cdct.o csbt.o cup.o cupl3.o cwinm.o dec8.o hwin.o icdct.o isbt.o iup.o iwinm.o l3dq.o l3init.o mdct.o mhead.o msis.o uph.o upsf.o ../build
make[2]: Leaving directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0/xingmp3'
make -C  libmp3
make[2]: Entering directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0/libmp3'
kos-cc  -c main.c -o main.o
main.c: In function ‘sndserver_thread’:
main.c:14:2: warning: implicit declaration of function ‘sndmp3_mainloop’ [-Wimplicit-function-declaration]
main.c: In function ‘mp3_init’:
main.c:24:3: warning: implicit declaration of function ‘sndmp3_wait_start’ [-Wimplicit-function-declaration]
main.c: In function ‘mp3_start’:
main.c:31:2: warning: implicit declaration of function ‘sndmp3_start’ [-Wimplicit-function-declaration]
main.c: In function ‘mp3_stop’:
main.c:35:2: warning: implicit declaration of function ‘sndmp3_stop’ [-Wimplicit-function-declaration]
main.c: In function ‘mp3_shutdown’:
main.c:40:2: warning: implicit declaration of function ‘sndmp3_shutdown’ [-Wimplicit-function-declaration]
main.c: In function ‘mp3_volume’:
main.c:45:8: warning: implicit declaration of function ‘sndmp3_volume’ [-Wimplicit-function-declaration]
kos-cc  -c sndmp3.c -o sndmp3.o
sndmp3.c: In function ‘xing_callback’:
sndmp3.c:126:3: warning: pointer targets in passing argument 2 of ‘audio_decode’ differ in signedness [-Wpointer-sign]
In file included from sndmp3.c:22:0:
../xingmp3/mhead.h:292:11: note: expected ‘unsigned char *’ but argument is of type ‘char *’
sndmp3.c: In function ‘xing_init’:
sndmp3.c:214:2: warning: pointer targets in passing argument 1 of ‘head_info2’ differ in signedness [-Wpointer-sign]
In file included from sndmp3.c:22:0:
../xingmp3/mhead.h:281:8: note: expected ‘unsigned char *’ but argument is of type ‘char *’
sndmp3.c: In function ‘sndmp3_thread’:
sndmp3.c:343:10: error: ‘jiffies’ undeclared (first use in this function)
sndmp3.c:343:10: note: each undeclared identifier is reported only once for each function it appears in
sndmp3.c:312:6: warning: variable ‘sj’ set but not used [-Wunused-but-set-variable]
sndmp3.c: In function ‘sndmp3_mainloop’:
sndmp3.c:456:2: warning: ‘sem_create’ is deprecated (declared at /home/yello/dc/kos/include/kos/sem.h:62) [-Wdeprecated-declarations]
/home/yello/dc/kos/Makefile.rules:13: recipe for target 'sndmp3.o' failed
make[2]: *** [sndmp3.o] Error 1
make[2]: Leaving directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0/libmp3'
/home/yello/dc/kos/Makefile.rules:45: recipe for target '_dir_libmp3' failed
make[1]: *** [_dir_libmp3] Error 2
make[1]: Leaving directory '/home/yello/dc/kos-ports/libmp3/build/libmp3-2.0.0'
/home/yello/dc/kos/../kos-ports/scripts/build.mk:11: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 2
make: Leaving directory '/home/yello/dc/kos-ports/libmp3'
2
Error building /home/yello/dc/kos/../kos-ports/libmp3. Bailing out.
Cygwin is x86 edition and my PC is 64bit of Windows10.
I don't know how to do.
Please help. Thank you.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

Ugh... Why does that use "jiffies"...

Either libmp3 hasn't worked for a while, or it's not actually using jiffies for anything, considering jiffies hasn't actually been counting anything for a long time... I'll have to look at it to fix that.
Twada
DC Developer
DC Developer
Posts: 42
Joined: Wed Jan 20, 2016 4:55 am
Has thanked: 18 times
Been thanked: 53 times

Re: Kos-Ports build error

Post by Twada »

I built Kos(not Kos-Ports) in an older version(2.0.0) as you had said that jiffies is not used.
Kos-Ports is successfully built.
A changed part of the newest kos caused my build error of Kos-Ports.
Please use this as reference to fix the same kind of error.

Thank you.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

As I said, libmp3 is referencing a variable that isn't available anymore. KOS 2.0.0 had jiffies available, but it did absolutely nothing.

EDIT:
As expected, the use of jiffies in that code was completely pointless... It has been removed and the revision has been pushed to the git repository (also the sem_create warning has been fixed as well, but that wasn't actually a "problem" so to speak).
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Kos-Ports build error

Post by nymus »

I suppose this is a good place to mention kos and kos-ports bild errors...

In following the instruction on the home page, encountered the following:

- kos-ports/zlib does not download correctly. I downloaded the archive manually and it worked. I don't know what the issue is.

- examples/dreamcsat/tsunami/{font, banner} try to link to -lk++ but I think we use -lstdc++ these days
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

I just was able to download zlib fine? The link it tries to download from is correct, so I'm not sure why it wouldn't have worked for you...

I'll fix the lk++ issues in a little bit...
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Kos-Ports build error

Post by nymus »

Yes, the URL is correct and it "should" work. Maybe it's something with OS X, but It returns a HTTP header stating error 403 forbidden, do not have permission to access zlib from this server. Preliminary research suggests it has to do with how browsers send user-agent strings or headers but I get garbage when I try to set -A "".

Anyway, my main issue right now is that I can't get dc-load-1.0.4 to compile. For some reason, libbfd and related includes are not being installed in --prefix. If I recall correctly, building binutils used to install them automatically without extra options. I used to compile it easily for whichever unix system I was using. Is there an updated dc-tool? I'll try manually copying it over....

Otherwise, I'm glad to get back to some Dreamcast coding. We''ll see if I can get some actual work released. Good work managing all of it, Bluecrab and team.
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

I'd recommend grabbing the latest dcload from the Git repository (hosted alongside KOS'). It can be built to use libelf instead of bfd these days (and that's the default, since Binutils doesn't install bfd anymore).
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Kos-Ports build error

Post by nymus »

Thanks! That explains and solves a lot! :D
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

I just tried building zlib through kos-ports on another box (a Raspberry Pi running Debian), and it works fine there too. For good measure, I tried both with curl and wget, and both worked fine. I think the issue is on your end here, unfortunately... Either that, or it was on the end of the zlib folks and they've since fixed it.
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Kos-Ports build error

Post by nymus »

Yes. It was on my end. I was trying out MacPostFactor to run Mountain Lion on an older Mac but I switched back to Lion because of some minor performance issues and did not encounter the error. The OS version mismatch is probably the culprit. It would be nice to keep the downloaded sources though...

Everything is working now.
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

If you want to keep the sources after the build, then just do "make install" instead of "make install clean".

Or, you can always re-fetch/unpack/patch them with "make fetch unpack copy-kos-files". :wink:
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Kos-Ports build error

Post by bogglez »

BlueCrab wrote:If you want to keep the sources after the build, then just do "make install" instead of "make install clean".

Or, you can always re-fetch/unpack/patch them with "make fetch unpack copy-kos-files". :wink:
You're posting a lot of undocumented make commands lately. How about writing a wiki article? :P
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5665
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Kos-Ports build error

Post by BlueCrab »

bogglez wrote:
BlueCrab wrote:If you want to keep the sources after the build, then just do "make install" instead of "make install clean".

Or, you can always re-fetch/unpack/patch them with "make fetch unpack copy-kos-files". :wink:
You're posting a lot of undocumented make commands lately. How about writing a wiki article? :P
The only one of those that is "undocumented" is the copy-kos-files (and that's because it generally shouldn't be used). The other two are in the kos-ports README. :wink:
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Kos-Ports build error

Post by nymus »

I must compliment you on a well-structured and modular build system. The only obstacle to using the make commands is that the build-all.sh is so much more convenient :) Unfortunately, it does make clean. I've modified mine to just pass the first parameter to the makefiles. (build-all.sh [ fetch, install, clean-dist, clean-build, clean... ].

Code: Select all

#! /bin/sh
for _dir in ${KOS_PORTS}/* ; do
    if [ -d "${_dir}" ] ; then
        if [ -f "${_dir}/Makefile" ] ; then
             echo "Checking if ${_dir} is installed and up-to-date..."
             ${KOS_MAKE} -C "${_dir}" version-check > /dev/null 2>&1
             rv=$?
             if [ "$rv" -eq 0 ] ; then
                echo "Building ${_dir}... $1"
                ${KOS_MAKE} -C "${_dir}" $1 
                rv=$?
                echo $rv
                if [ "$rv" -ne 0 ] ; then
                    echo "Error building ${_dir}. Bailing out."
                    exit 1
                fi
            else
                echo "${_dir} is already installed and up-to-date. Skipping."
            fi
        fi
    fi
done


behold the mind
inspired by Dreamcast
Post Reply