Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 703160

Summary: dev-embedded/jlink - Tools for Segger J-Link JTAG adapters
Product: Gentoo Linux Reporter: Thomas Capricelli <orzel>
Component: New packagesAssignee: Default Assignee for New Packages <maintainer-wanted>
Status: CONFIRMED ---    
Severity: normal CC: gabemarcano
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://www.segger.com/products/debug-probes/j-link/
See Also: https://github.com/gentoo/gentoo/pull/19297
Whiteboard:
Package list:
Runtime testing required: ---

Description Thomas Capricelli 2019-12-17 00:30:53 UTC
RISC-V development requires some code from jlink to access boards (such as HiFive 1).

There are some ebuilds arounds: https://gpo.zugaina.org/dev-embedded/jlink

But they dont work. If i copy the ebuild in my overlay and do 'repoman manifest', despite having the proper file downloaded in my /usr/portage/distfiles, it says:


 * Download amd64? ( JLink_Linux_V660_x86_64.tgz )
 *      x86? ( JLink_Linux_V660_i386.tgz )
 * from http://www.segger.com/jlink-software.html and place it in /var/tmp/tmpDrHtvS/portage/dev-embedded/jlink-6.60/distdir
!!! Fetch failed for JLink_Linux_V660_i386.tgz, can't update Manifest
!!! Unable to generate manifest for '/usr/fhoverlay/dev-embedded/jlink'.
  manifest.bad [fatal]          1
   dev-embedded/jlink/Manifest

I dont know where it got "/var/tmp/tmpDrHtvS/portage/dev-embedded/jlink-6.60/distdir" from, but i can't put my file there, the path doesn't exist (anymore?).


Reproducible: Always
Comment 1 Thomas Capricelli 2019-12-17 01:08:22 UTC
As a turnaround, it works if you
* get JLink_Linux_V646h_x86_64.tgz from the url found in ebuild, and put that in your distfiles
* fix the line in ebuild to not depend on arch:

SRC_URI="JLink_Linux_V${PV/\./}_x86_64.tgz"
Comment 2 Gabriel Marcano 2022-02-25 07:43:02 UTC
I tested the ebuild from the pull request, and while it works OK, I've found two problems:

1. It misses the JLinkGDBServerExe executable
2. Because it uses make_wrapper, the resulting executables can't handle parameters passed in as relative paths.

Fixing 1 is easy-- it's just adding that binary to the list of bins to install.

Fixing 2... I'm not sure what's the best way to do it. One option is to make a 99jlink file to configure the environment in /etc/env.d/, possibly updating PATH and LDPATH. Another option is to output some kind of message telling the user it's their responsibility to figure out the PATH and LDPATH problem, although that feels like passing the buck.