Problem compiling / install a program from source

I’m trying to compile the source for Heimdall (Heimdall is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy S devices) but am running into a problem. More information about Heimdall can be found here and sources from github here.

The instructions for compiling are:

Appendix B - Installing Heimdall from Source:

1. First make sure you have installed build-tools, pkgconfig, zlib-dev and
   libusb-1.0-dev (v1.0.8 or newer).
   NOTE: Package names may not be absolutely identical to those above.
2. Open a terminal and navigate to the directory you downloaded,
   or extracted, Heimdall to.
3. Enter the following commands to compile libpit.
        cd libpit
        ./configure
        make
        cd ..
   NOTE: There is no need to run "sudo make install".
4. Enter the following commands to compile and install Heimdall:
        cd heimdall
        ./configure
        make
        sudo make install
        cd ..
   NOTE: As an alternative to "sudo make install" you may chose to generate
         a package by typing the following:
            sudo checkinstall --pkgversion <version>
         Where <version> is the current Heimdall release e.g. 1.3.0
5. Done

I managed to get as far as the sudo make install part of step 4. When I try sudo make install I get the following errors:

sudo make install
make[1]: Entering directory /Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
test -z "/usr/local/bin" || /bin/mkdir -p "/usr/local/bin"
  /bin/sh ./libtool   --mode=install /usr/bin/install -c heimdall '/usr/local/bin'
libtool: install: /usr/bin/install -c heimdall /usr/local/bin/heimdall
test -z "/lib/udev/rules.d" || /bin/mkdir -p "/lib/udev/rules.d"
 /usr/bin/install -c -m 644 60-heimdall-galaxy-s.rules '/lib/udev/rules.d'
make  install-data-hook
make[2]: Entering directory/Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
sudo service udev restart
service: no such service udev
make[2]: *** [install-data-hook] Error 1
make[2]: Leaving directory /Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
make[1]: *** [install-data-am] Error 2
make[1]: Leaving directory/Galaxy_S2_Flashing/Heimdall/Heimdall-1.3.1/heimdall'
make: *** [install-am] Error 2

It seems it can’t find the udev service. I’ve tried to look for it manually but cannot find it but I notice that udev is started at boot time by boot.udev.

Should I have a udev service running? I’ve previously managed to install Heimdall so don’t know what’s wrong this time. Any help or guidance appreciated.

Did you search for it
software.opensuse.org: Search Results

Hi
Why not ask the package maintainers to update?
software.opensuse.org: Search Results

Thanks cat, yes I did but the packages are quite old so thought I would try compile it myself.

Hi
Why not ask the package maintainers to update?
software.opensuse.org: Search Results

Thanks Malcom. I wasn’t aware I could do that. I wouldn’t even know where to start with asking.

OK, I’ve just had a look. Do I go to the OBS and click on the Requests link and add it there (https://build.opensuse.org/project/requests?project=hardware)? Is it as simple as just asking for the package to be updated?

Hi
Yes, on the package, find the maintainer in the users list and send an email off, in this case there is no one allocated, so would contact the last person in the changelog…

Anyway, I’ve branched and will updated it. In the meantime, if you look at the source file list, there is a patch which skips the service restart… :wink:

Great. I’ll give the patch a try. I really should become more familiar with how the OBS works.

I look forward to the updated Heimdall.

Thanks for your help.

Hi
It’s updated;
https://build.opensuse.org/package/show?package=heimdall&project=home%3Amalcolmlewis%3Abranches%3Ahardware

Just need to wait for the SR to be accepted;
https://build.opensuse.org/request/show/86268

Had to add an extra patch to use older versions of QT to build the
frontend on 11.3 and SLE.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 7 days 3:39, 4 users, load average: 0.16, 0.19, 0.28
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Thanks Malcolm. I’ll give it a try tomorrow when I have a little more time.

Hi Malcolm, I just tried installing your build of Heimdall but cannot add your repo to Yast. I get a message about a certificate not being available and then yast fails to add the repo. Also, trying to put the path of your repo into the browser comes up with an object not found. Is that because your request has not been accepted yet?

Hi
Correct, it’s automatically set to not publish. Do you have an account
on OBS? If so you could just login and download manaually from the
branch page.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 7 days 22:32, 4 users, load average: 0.08, 0.19, 0.20
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Yes, I have an account but I’ll just wait. Thanks again for your efforts.

Hi Malcolm. Just a couple of points I hope you can shed some light on. I installed heimdall and heimdall-frontend from the packages you built but noticed a couple of issues.

Running either heimdall or heimdall-frontend as normal user throws a libusb -3 error when trying to read or access the rom. E.G. I tried reading the PIT file from the phones firmware. Running either heimdall or heimdall-frontend as root works fine.

This is the error from the konsole.

Initialising connection...
Detecting device...
libusb couldn't open USB device /dev/bus/usb/001/009: Permission denied.
libusb requires write access to USB device nodes.
ERROR: Failed to access device. libusb error: -3

It seems that root is required to be able to access the USB device? Is this normal or is my libusb installation / permissions messed up? If so then that is a matter for another thread.

Just for information I can connect, read and write to the phone’s SD-Card and phone’s file system without root through Dolphin or the konsole so I assume libusb is not used for that.

Hi
Can you create a file called 60-heimdall-galaxy-s.rules with the
following content;


SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6601", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685D", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="68C3", MODE="0666"

Save this file in /lib/udev/rules.d/ and change its permissions to 0644.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 10 days 2:11, 4 users, load average: 0.26, 0.20, 0.21
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Ahh scratch that, it’s there. Is your device idVendor the same as
those? If not add a new entry.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 10 days 2:23, 5 users, load average: 0.14, 0.21, 0.22
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

Ah, I think you may be onto something. Product ID seems to be different.

Oct  6 16:56:23 suntp001 kernel: [35251.769112] usb 1-5: new high speed USB device using ehci_hcd and address 12
Oct  6 16:56:23 suntp001 kernel: [35251.885428] usb 1-5: New USB device found, idVendor=04e8, idProduct=6860
Oct  6 16:56:23 suntp001 kernel: [35251.885434] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Oct  6 16:56:23 suntp001 kernel: [35251.885438] usb 1-5: Product: SAMSUNG_Android
Oct  6 16:56:23 suntp001 kernel: [35251.885441] usb 1-5: Manufacturer: SAMSUNG
Oct  6 16:56:23 suntp001 kernel: [35251.885444] usb 1-5: SerialNumber: 304D1XXXXXXXXXE
Oct  6 16:56:24 suntp001 udevd-work[24755]: kernel-provided name 'bus/usb/001/012' and NAME= 'vboxusb/1/12' disagree, please use SYMLINK+= or change the kernel to provide the proper name

So I should just add

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666"

to the end of the list?

I have that weird message at the end about vbox but that I’ll bring up in another thread.

Hi
Yes, that’s right add a new line with the 6860 :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 10 days 3:33, 5 users, load average: 0.15, 0.15, 0.15
GPU GeForce 8600 GTS Silent - Driver Version: 280.13