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
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.
'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.