Created attachment 223895 [details] patches for Makefile and pkg-plist After installing sdcc from package and trying to compile a .c-testfile for PIC16F84a I get the error 'libsdcc.lib missing'. When trying the port lang/sdcc I found an error when compiling pic14-port part. The pic16-port is Ok. I have found a missing line in lang/sdcc/Makefile that makes it compile all libs except libsdcce.lib (enhanced). Have not found out why libsdcce.lib still is missing... The relevant lines in pkg-plist for the compiled pic14-port libs are also missing. After manual copy of the missing libs to /usr/local/share/sdcc/lib/pic14 the testfile compiled Ok. My host: 12.2-RELEASE-p4 GENERIC amd64 sdcc version: sdcc-4.0.0_1 Patches included. Additional Information: Have tested an ARCH Linux sdcc package (same version) and it has all pic14-port libs, including the 'libsdcce.lib' and testfile compiled Ok.
I tried a build with your patches and builds & installs for me - I don't have any PIC code to test on so I'll take your word it works :) I'm not sure about libsdcce.a - the auto*/configure stuff is very complicated so I am not sure what the problem is. Do you think you could chase it up on an SDCC mailing list?
There are tests for all functions in all ports in directory support/regression. To run: 'cd support/regression' and 'gmake' run all tests for all ports. (takes looooooong time to run) 'gmake test-pic14' only tests pic14-port. I did that. (takes looong time) 'touch tests/<test-case>.c; gmake [test-<target>]' re-execute single test case. More info at https://sourceforge.net/p/sdcc/wiki/Regression%20Testing/ The tests I have run for pic14-port require at least gmake,gputils,gpsim and python. On my desktop there is only python with version in commandname so I had to make a link from 'python3.6' to 'python'. Sadly, of 6488 tests there were 281 failures and 31 abnormal stop. Some tests fail with coredump of gplink and some with sim-timeout of gpsim. I have not dig into these errors. Im currently trying to locate the problems with libsdcce.lib.
I have found the cause for not building libsdcce.lib. When I edit the file /device/lib/pic14/libsdcc/enhanced/Makefile and set back PICARCH to ARCH and then removed .../work/.stage_done.sdcc._usr_local the compilation and installation into stage directory worked Ok. So the obvious problem lies in the lang/sdcc/Makefile that change all occurrences of ARCH to PICARCH. I am not that familiar with package setup so I am not the person to alter the package to solve this, just to point in the right direction. In the gplink and gpsim problems I will do some digging.
I am afraid that the problems with gplink and gpsim have to be solved in the source code. When I tested the source on a Arch Linux I got the same errors. The forum states that pic14 and pic16 currently is unmaintained.
OK, given it's an upstream problem I guess not much can be done. I think the patch you created can be committed as is, as I have tested it. I'll try and find a ports committer to do that.
Created attachment 224801 [details] Updated patch
(In reply to darius from comment #6) Oops, I forgot I'd had to modify your patch to install without warning. The attached patch passes stage-qa and bumps PORTREVISION.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=df586078d6966c77829ee2584854c250988129ef commit df586078d6966c77829ee2584854c250988129ef Author: Joseph Mingrone <jrm@FreeBSD.org> AuthorDate: 2021-05-10 01:54:32 +0000 Commit: Joseph Mingrone <jrm@FreeBSD.org> CommitDate: 2021-05-10 02:55:36 +0000 lang/sdcc: Fix compilation issue and install libaries for pic14-port PR: 254852 Approved by: darius@dons.net.au (maintainer) Co-authored-by: darius@dons.net.au Co-authored-by: pererikrunebert95@gmail.com lang/sdcc/Makefile | 3 ++- lang/sdcc/pkg-plist | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-)
Committed. Thanks for submitting.