[asdf-devel] android ECL port cache directory problem

Daniel Kochmański daniel at turtleware.eu
Tue Oct 20 12:58:15 UTC 2015


Thanks for the reply.

Faré writes:

> I don't understand your question.

I'm sorry to hear that. Problem was related to the fact, that I was able
to load the system definition file from the _subdirectory_ of the path
pointed by *central-registry* but couldn't load the system.
> 1- SLIME has its own compilation and cache machinery, independent from
> ASDF.

Didn't know about that - assumed that having swank.asd present means
that the build process controlled by ASDF. It must be the problem with
slime then(?).
> 2- The source-registry, recommended way of using ASDF (for speed, use
> the cl-source-registry-cache), has both :directory and :tree

I'll use source-registry when I overcome the problems I work on now.

Thanks,
Daniel
>
> —♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org
> Keynesians: why bring prosperity to other countries through war's devastation?
> Let's bring back the troops and have them bomb OUR cities!
>
>
> On Tue, Oct 20, 2015 at 8:05 AM, Daniel Kochmański <daniel at turtleware.eu> wrote:
>> update:
>>
>> adding explicit
>>
>> (pushnew (namestring (merge-pathnames #P"slime-2.14/" *ecl-home*))
>>          asdf:*central-registry*)
>>
>> solved the problem. Is it a desired feature that asdf can "reach" asd
>> file from some subdirectory but can't load such a system?
>>
>> Regards,
>> Daniel
>>
>> Daniel Kochmański writes:
>>
>>> Hello,
>>>
>>> I'm currently working on ECL port for the android. I've managed to make
>>> it more or less usable, but I've encountered some problem with the cache
>>> directory translation in ASDF. Not sure how to solve it.
>>>
>>> Everything from the application has to be put in it's directory (in this
>>> case its /data/data/org.lisp.ecl/) under directories app_resources/,
>>> cache/ etc.
>>>
>>>
>>> To achieve it I set necessary directories from the initializatio script
>>> with:
>>>
>>> sprintf(tmp, "(setq *default-pathname-defaults* #p\"%s/\")", home);
>>> si_safe_eval(3, c_string_to_object(tmp), Cnil, OBJNULL);
>>> si_select_package(ecl_make_simple_base_string("CL-USER", 7));
>>> si_safe_eval(3, c_string_to_object("(load \"init\")"), Cnil, OBJNULL);
>>>
>>> Where home points to /data/data/org.lisp.ecl/app_resources/
>>>
>>> Also related part of the init.lisp file:
>>> -- CUT HERE --
>>> (format t "Setting environment variables~%")
>>> (setq *default-directory*
>>>       *default-pathname-defaults*)
>>> (defvar *ecl-home* *default-directory*)
>>> (ext:setenv "HOME" (namestring *ecl-home*))
>>> (ext:setenv "USER-CACHE"
>>>             (namestring (merge-pathnames #P"../cache/" *ecl-home*)))
>>> (setf asdf:*user-cache*
>>>             (merge-pathnames #P"../cache/" *default-pathname-defaults*))
>>>
>>> (format t "Loading the modules~%")
>>> (require :ASDF)
>>> (require :SOCKETS)
>>> (require :SERVE-EVENT)
>>>
>>> (pushnew (namestring *default-pathname-defaults*)
>>>        asdf:*central-registry*)
>>>
>>> ;; (asdf::ensure-output-translations)
>>> (format t "XXX: DIAG:~%
>>>     (asdf:compute-output-translations) ~A~%
>>>     (ext:getenv \"HOME\"               ~A~%
>>>     asdf:*user-cache*                  ~A~%
>>>     (truename \"SYS:\")                ~A~%
>>>     *default-pathname-defaults*        ~A~%~%"
>>>         (asdf::compute-output-translations)
>>>         (ext:getenv "HOME")
>>>         asdf:*user-cache* (truename "SYS:") *default-pathname-defaults*)
>>>
>>> (format t "Preparing swank~%")
>>> (handler-case (asdf:oos 'asdf:load-op :swank :verbose t)
>>>   (condition (c)
>>>     (format t "condition ~A happened~%" c)
>>>     (format t "filepath SYS:SLIME-2.14;SWANK.ASD.NEWEST: ~A~%"
>>>             (truename #P"SYS:SLIME-2.14;SWANK.ASD.NEWEST"))
>>>     (force-output)
>>>     (error c)))
>>> -- CUT HERE --
>>>
>>> But this fails with filesystem error for pathname
>>> #P"/SLIME-2.14/SWANK-LOADER-tmpWIW7CRE5.FASC"
>>>
>>> Related part of the logcat output:
>>> -- CUT HERE --
>>> I/stdout  (19157): Setting environment variables
>>> I/stdout  (19157): Loading the modules
>>> I/stdout  (19157): XXX: DIAG:
>>> I/stdout  (19157):     (asdf:compute-output-translations) ((SYS:**;*.*.* T)
>>> I/stdout  (19157):                                         (/data/data/org.lisp.ecl/cache/**/*.*
>>> I/stdout  (19157):                                          T)
>>> I/stdout  (19157):                                         (T
>>> I/stdout  (19157):                                          /data/data/org.lisp.ecl/cache/**/*.*))
>>> I/stdout  (19157):     (ext:getenv "HOME"               /data/data/org.lisp.ecl/app_resources/
>>> I/stdout  (19157):     asdf:*user-cache*                  /data/data/org.lisp.ecl/app_resources/../cache/
>>> I/stdout  (19157):     (truename "SYS:")                /data/data/org.lisp.ecl/app_resources/
>>> I/stdout  (19157):     *default-pathname-defaults*        /data/data/org.lisp.ecl/app_resources/
>>> I/stdout  (19157): Preparing swank
>>> I/stdout  (19157): condition Filesystem error with pathname #P"/SLIME-2.14/SWANK-LOADER-tmpWIW7CRE5.FASC".
>>> I/stdout  (19157): Either
>>> I/stdout  (19157):  1) the file does not exist, or
>>> I/stdout  (19157):  2) we are not allowed to access the file, or
>>> I/stdout  (19157):  3) the pathname points to a broken symbolic link. happened
>>> I/stdout  (19157): filepath SYS:SLIME-2.14;SWANK.ASD.NEWEST: /data/data/org.lisp.ecl/app_resources/slime-2.14/swank.asd
>>> I/native-activity(19157): EXIT TOP LEVEL
>>> -- CUT HERE--
>>>
>>> As you can see caches seem to be set up properly. But ECL tries to load
>>> the FASC file from the root directory.
>>>
>>> Note, that if slime files are put directly in app_resources, not in
>>> slime-2.14 directory everything loads fine.
>>>
>>> I would be greatful for any hints.
>>>
>>> Thanks,
>>> Daniel
>>
>> --
>> Daniel Kochmański | Poznań, Poland
>> ;; aka jackdaniel
>>
>> "Be the change that you wish to see in the world." - Mahatma Gandhi
>>

-- 
Daniel Kochmański | Poznań, Poland
;; aka jackdaniel

"Be the change that you wish to see in the world." - Mahatma Gandhi



More information about the asdf-devel mailing list