WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Help needed for "make" using a makefile  (Read 4693 times)

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Help needed for "make" using a makefile
« on: November 22, 2014, 07:54:04 AM »
Hi I'm trying to build a squeezelite.tcz so we can add this player for piCore.

Squeezelite is a software player allowing us to plays music from a Squeezebox server. It can be found here: https://code.google.com/p/squeezelite/wiki/BuildInstructions

I used the raspberry specific makefile from here: https://github.com/ralph-irving/squeezelite   Used the Makefile.rpi

However, I get this error when I try to build squeezelite using the makefile.

Code: [Select]
tc@box:/mnt/mmcblk0p2/SBP_compiled/Squeezelite$ make -f Makefile.rpi
cc -Wall -fPIC -O2 -DRESAMPLE -DFFMPEG -DVI.PORT -DDSD -I./include main.c -c -o main.o
In file included from /usr/include/errno.h:35:0,
                 from squeezelite.h:197,
                 from main.c:21:
/usr/include/bits/errno.h:24:26: fatal error: linux/errno.h: No such file or directory
 # include <linux/errno.h>
                          ^
compilation terminated.
Makefile.rpi:20: recipe for target 'main.o' failed
make: *** [main.o] Error 1

I'm using the most recent piCore6 beta1 version - can that be the problem?

But probably it is me that once again is out in deep water again.

Regards
Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help needed for "make" using a makefile
« Reply #1 on: November 22, 2014, 08:26:30 AM »
Install linux-3.16.y_api_headers.tcz
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help needed for "make" using a makefile
« Reply #2 on: November 22, 2014, 11:50:55 AM »
Thanks for the suggestion.

Now it started to build fine, however,  I had enabled decoding via ffmpeg and possibility for resample via soxr, and eventhough I had these packages installed the build process terminated premature.

I'm sure I need the packages:
soxr-dev.tcz and soxr.tcz
Unfortunately, I think it is above my capacity to make these two packages

Code: [Select]
cc -Wall -fPIC -O2 -DRESAMPLE -DFFMPEG -DVI.PORT -DDSD -I./include resample.c -c -o resample.o
resample.c:28:18: fatal error: soxr.h: No such file or directory
 #include <soxr.h>
                  ^
compilation terminated.
Makefile.rpi:20: recipe for target 'resample.o' failed
make: *** [resample.o] Error 1

If I remove the possibility to resample from the makefile (remove the oxr dependency), I can build a squeezelite executable successfully.

Regards
Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help needed for "make" using a makefile
« Reply #3 on: November 22, 2014, 12:36:56 PM »
Regarding soxr.h check location, it can be an issue with /usr/include <-> / usr/local/include. Try symlinking it to the other location, it may help (or not).
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help needed for "make" using a makefile
« Reply #4 on: November 23, 2014, 12:14:52 PM »
Hi
It turned out that the header file soxr.h was not present anywhere.
Therefore, I extracted it from the source: soxr-o.1.1-Source.tar.xz and copied it to /usr/include. Probably not fully correct as I can see all the other files in /usr/include are symbolic links - but it worked.

Next run the Makefile.rpi and now Squeezelite is build successfully.

Belá - which directory would be the correct location for squeezelite?


Steen

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help needed for "make" using a makefile
« Reply #5 on: November 23, 2014, 01:40:27 PM »

Belá - which directory would be the correct location for squeezelite?


/usr/local
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: Help needed for "make" using a makefile
« Reply #6 on: December 07, 2014, 07:58:57 AM »
Hi Belá

As you know Greg and I have planned to make piCorePlayer into a piCorePlayer.tcz.
But we would like to do it correct, so we place the files at the correct location.

Until now piCorePlayer web pages and scripts have been located in:
/home/tc/www/cgi-bin - for cgi and sh files
/home/tc/www/css - for css file
/home/tc/www/images - for banner image etc
/home/tc/www/js - for js file
/home/tc/www/index.html

But what would be the correct structure for piCorePlayer in piCore?
Should we put it in
/var/www/
or /usr/lib/cgi-bin/ etc
or maybe /usr/local/piCorePlayer/ ?

Steen

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Help needed for "make" using a makefile
« Reply #7 on: December 07, 2014, 10:20:59 AM »
/opt/picoreplayer or /usr/local/picoreplayer. I would put it in /opt.
The only barriers that can stop you are the ones you create yourself.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help needed for &quot;make&quot; using a makefile
« Reply #8 on: December 07, 2014, 10:49:50 AM »
/usr/local/piCoreplayer

Similar to mysql, firefox, go, etc.

Html content

/var/www/html
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Help needed for "make" using a makefile
« Reply #9 on: December 08, 2014, 11:55:55 PM »
/opt/picoreplayer or /usr/local/picoreplayer. I would put it in /opt.

If you chosse /opt add it as an exception to /opt/xfiletool.lst as /opt is part of backup.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."