swiftc: Possible values for "-target" command line option - swift

There is Swift compiler option -target:
$ swiftc -h
...
-target <value> Generate code for the given target
...
Where from can I get all possible values for compiler option -target (i.e: x86_64-apple-ios11.0, x86_64-apple-macosx10.12, ...) ?
Thanks!

Look at https://github.com/apple/swift/blob/master/utils/build-script-impl
Search the build script for terms like SWIFT_HOST_VARIANT, SWIFT_HOST_VARIANT_SDK, SWIFT_HOST_VARIANT_ARCH and SWIFT_HOST_TRIPLE
#!/usr/bin/env bash
#===--- build-script-impl - Implementation details of build-script ---------===#
#
## This source file is part of the Swift.org open source project
# Each variable name is re-exported into this script in uppercase, where dashes
# are substituted by underscores. For example, `swift-install-components` is
# referred to as `SWIFT_INSTALL_COMPONENTS` in the remainder of this script.
KNOWN_SETTINGS=(
# name default description
# ... snip ...
darwin-deployment-version-osx "10.9" "minimum deployment target version for OS X"
darwin-deployment-version-ios "7.0" "minimum deployment target version for iOS"
# ... snip ...
function set_build_options_for_host() {
llvm_cmake_options=()
swift_cmake_options=()
cmark_cmake_options=()
lldb_cmake_options=()
swiftpm_bootstrap_options=()
SWIFT_HOST_VARIANT=
SWIFT_HOST_VARIANT_SDK=
SWIFT_HOST_VARIANT_ARCH=
SWIFT_HOST_TRIPLE=
local host="$1"
# Hosts which can be cross-compiled must specify:
# SWIFT_HOST_TRIPLE and llvm_target_arch (as well as usual HOST_VARIANT flags)
case ${host} in
freebsd-x86_64)
SWIFT_HOST_VARIANT="freebsd"
SWIFT_HOST_VARIANT_SDK="FREEBSD"
SWIFT_HOST_VARIANT_ARCH="x86_64"
;;
cygwin-x86_64)
SWIFT_HOST_VARIANT="cygwin"
SWIFT_HOST_VARIANT_SDK="CYGWIN"
SWIFT_HOST_VARIANT_ARCH="x86_64"
;;
# ... snip ...
linux-*)
SWIFT_HOST_VARIANT="linux"
SWIFT_HOST_VARIANT_SDK="LINUX"
case ${host} in
linux-x86_64)
SWIFT_HOST_VARIANT_ARCH="x86_64"
;;
# ... snip ...
linux-aarch64)
SWIFT_HOST_VARIANT_ARCH="aarch64"
;;
# ... snip ...
;;
macosx-* | iphoneos-* | iphonesimulator-* | \
appletvos-* | appletvsimulator-* | \
watchos-* | watchsimulator-*)
case ${host} in
macosx-x86_64)
xcrun_sdk_name="macosx"
llvm_target_arch=""
SWIFT_HOST_TRIPLE="x86_64-apple-macosx${DARWIN_DEPLOYMENT_VERSION_OSX}"
SWIFT_HOST_VARIANT="macosx"
SWIFT_HOST_VARIANT_SDK="OSX"
SWIFT_HOST_VARIANT_ARCH="x86_64"

Related

Join two lists of strings in a makefile

In my makefile there is a variable that contains all source files:
SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
I now want to create a DEPFILES that contains the same files as SOURCES with two main differences:
Each file ends with ".d" instead of ".c"
Each file contains a "." before its basename, such that the resulting file is hidden.
I came up with this expression, which works well:
DEPFILES := $(foreach s,$(SOURCES:.$(SRCEXT)=.$(DEPSEXT)),$(shell echo $(s) | sed -e 's/^\(.*\/\)/\1./')))
Initially, I split SOURCES into the following lists:
PRE := $(dir $(SOURCES))
SUF := $(addprefix ".", $(notdir $(SOURCES)))
Question: How do you join those two lists in a makefile, such that the results equals DEPFILES? In other words: How do you pairwisely concat the strings from both lists?
Here is a simpler approach using makefile only and no shell - if I understood your requirement ok:
SRCS += bob/src1.c fred/src2.c src3.c
DEPS=$(join $(addsuffix ., $(dir $(SRCS))), $(notdir $(SRCS:.c=.d)))
# Some debug:
$(info 1. $(SRCS))
$(info 2. $(SRCS:.c=.d))
$(info 3. $(notdir $(SRCS:.c=.d)))
$(info 4. $(dir $(SRCS)))
.PHONY: all
all:
#echo SRCS: $(SRCS)
#echo DEPS: $(DEPS)
I broke the output down into steps so you can see what each part does - saves me to explain it!
outputs:
1. bob/src1.c fred/src2.c src3.c
2. bob/src1.d fred/src2.d src3.d
3. src1.d src2.d src3.d
4. bob/ fred/ ./
SRCS: bob/src1.c fred/src2.c src3.c
DEPS: bob/.src1.d fred/.src2.d ./.src3.d

Merging several vcf files using snakemake

I am trying to merge several vcf files by chromosome using snakemake. My files are like this, and as you can see has various coordinates. What is the best way to merge all chr1A and all chr1B?
chr1A:0-2096.filtered.vcf
chr1A:2096-7896.filtered.vcf
chr1B:0-3456.filtered.vcf
chr1B:3456-8796.filtered.vcf
My pseudocode:
chromosomes=["chr1A","chr1B"]
rule all:
input:
expand("{sample}.vcf", sample=chromosomes)
rule merge:
input:
I1="path/to/file/{sample}.xxx.filtered.vcf",
I2="path/to/file/{sample}.xxx.filtered.vcf",
output:
outf ="{sample}.vcf"
shell:
"""
java -jar picard.jar GatherVcfs I={input.I1} I={input.I2} O={output.outf}
"""
EDIT:
workdir: "/media/prova/Maxtor2/vcf2/merged/"
import subprocess
d = {"chr1A": ["chr1A:0-2096.flanking.view.filtered.vcf", "chr1A:2096-7896.flanking.view.filtered.vcf"],
"chr1B": ["chr1B:0-3456.flanking.view.filtered.vcf", "chr1B:3456-8796.flanking.view.filtered.vcf"]}
rule all:
input:
expand("{sample}.vcf", sample=d)
def f(w):
return d.get(w.chromosome, "")
rule merge:
input:
f
output:
outf ="{chromosome}.vcf"
params:
lambda w: "I=" + " I=".join(d[w.chromosome])
shell:
"java -jar /home/Documents/Tools/picard.jar GatherVcfs {params[0]} O={output.outf}"
I was able to reproduce your bug. When constraining the wildcards, it works:
d = {"chr1A": ["chr1A:0-2096.flanking.view.filtered.vcf", "chr1A:2096-7896.flanking.view.filtered.vcf"],
"chr1B": ["chr1B:0-3456.flanking.view.filtered.vcf", "chr1B:3456-8796.flanking.view.filtered.vcf"]}
chromosomes = list(d)
rule all:
input:
expand("{sample}.vcf", sample=chromosomes)
# these tell Snakemake exactly what values the wildcards may take
# we use "|" to create the regex chr1A|chr1B
wildcard_constraints:
chromosome = "|".join(chromosomes)
rule merge:
input:
# a lambda is an unnamed function
# the first argument is the wildcards
# we merely use it to look up the appropriate files in the dict d
lambda w: d[w.chromosome]
output:
outf = "{chromosome}.vcf"
params:
# here we create the string
# "I=chr1A:0-2096.flanking.view.filtered.vcf I=chr1A:2096-7896.flanking.view.filtered.vcf"
# for use in our command
lambda w: "I=" + " I=".join(d[w.chromosome])
shell:
"java -jar /home/Documents/Tools/picard.jar GatherVcfs {params[0]} O={output.outf}"
It should have worked without the constraints too; this seems like a bug in Snakemake.

xmllint usage in linux (shell script)

<?xml version="1.0" encoding="utf-8"?><DataTransfer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://cbi.marian.com/xmlschemas/jde_interface_v1.0.xsd"><Summary>
<PO>
<PONumber>1798128110160-1</PONumber>
<PORevision>6</PORevision>
<POSystemID>273906</POSystemID>
<OrderDate>19-02-2015</OrderDate>
<RequiredDate>15-10-2016</RequiredDate>
<PromisedDeliveryDate>27-03-2017</PromisedDeliveryDate>
<RetentionPercentage></RetentionPercentage>
<POReference1>1798128110160-1</POReference1>
<POReference2></POReference2>
</PO>
<POItem>
<LineNumber> 1</LineNumber>
<ItemDescription>Enclosure containing </ItemDescription>
<POReference1>1798128110160-1</POReference1>
<POReference2></POReference2>
</POItem>
<POItem>
<LineNumber> 2</LineNumber>
<ItemDescription>Compressor</ItemDescription>
<POReference1>1798128110160-1</POReference1>
<POReference2></POReference2>
</POItem>
<POItem>
<LineNumber> 3</LineNumber>
<ItemDescription>Cooler</ItemDescription>
<POReference1>1798128110160-1</POReference1>
<POReference2></POReference2>
</POItem>
In the above xml I want to read only the 1st LineNumber under POItem. I am using the following command:
echo cat "//POItem/LineNumber/text()" | xmllint --shell po123.xml
This displays all 3 LineNumber values. Is it possible to fetch only the 1st LineNumber value without using the sed command. XML file name is po123.xml
I don't have xpath in my current xmllint.
Try this:
echo cat '//POItem[1]/LineNumber/text()' | xmllint --shell po123.xml
This prints the LineNumber of the first POItem element.

NSLocalizedString managing translations over app versions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Here is a scenario:
I write an iPhone app using NSLocalizedString incase I decide to release it in different countries.
I decide to release the App over in France.
The translator takes my Localized.strings and does a great job translating
I update the app, and need some more translating.
I'm using genstrings and it overwrites the good work the translator did, is there a easy way for me to manage my translations over App versions?
Check out this project on GitHub, which provides a python scripts which makes genstrings a little bit smarter.
Since I don't like link-only answers (links may die), I'll also drop here the python script (all credits go to the author of the linked project)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Localize.py - Incremental localization on XCode projects
# João Moreno 2009
# http://joaomoreno.com/
# Modified by Steve Streeting 2010 http://www.stevestreeting.com
# Changes
# - Use .strings files encoded as UTF-8
# This is useful because Mercurial and Git treat UTF-16 as binary and can't
# diff/merge them. For use on iPhone you can run an iconv script during build to
# convert back to UTF-16 (Mac OS X will happily use UTF-8 .strings files).
# - Clean up .old and .new files once we're done
# Modified by Pierre Dulac 2012 http://friendcashapp.com
# Changes
# - use logging instead of print
# Adds
# - MIT Licence
# - the first parameter in the command line to specify the path of *.lproj directories
# - an optional paramter to control the debug level (set to info by default)
# Fixes
# - do not convert a file if it is already in utf-8
# - allow multiline translations generated by genstrings by modifing the re_translation regex
# -
# MIT Licence
#
# Copyright (C) 2012 Pierre Dulac
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial
# portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
from sys import argv
from codecs import open
from re import compile
from copy import copy
import os
import shutil
import optparse
import logging
logging.getLogger().level = logging.INFO
__version__ = "0.1"
__license__ = "MIT"
USAGE = "%prog [options] <url>"
VERSION = "%prog v" + __version__
re_translation = compile(r'^"((?:[^"]|\\")+)" = "((?:[^"]|\\")+)";(?:\n)?$')
re_comment_single = compile(r'^/\*.*\*/$')
re_comment_start = compile(r'^/\*.*$')
re_comment_end = compile(r'^.*\*/$')
class LocalizedString():
def __init__(self, comments, translation):
self.comments, self.translation = comments, translation
self.key, self.value = re_translation.match(self.translation).groups()
def __unicode__(self):
return u'%s%s\n' % (u''.join(self.comments), self.translation)
class LocalizedFile():
def __init__(self, fname=None, auto_read=False):
self.fname = fname
self.reset()
if auto_read:
self.read_from_file(fname)
def reset(self):
self.strings = []
self.strings_d = {}
def read_from_file(self, fname=None):
self.reset()
fname = self.fname if fname == None else fname
try:
#f = open(fname, encoding='utf_8', mode='r')
f = open(fname, encoding='utf_8', mode='r')
except:
print 'File %s does not exist.' % fname
exit(-1)
try:
line = f.readline()
logging.debug(line)
except:
logging.error("Can't read line for file: %s" % fname)
raise
i = 1
while line:
comments = [line]
if not re_comment_single.match(line):
while line and not re_comment_end.match(line):
line = f.readline()
comments.append(line)
line = f.readline()
i += 1
# handle multi lines
while len(line) > 1 and line[-2] != u';':
line += f.readline()
i += 1
logging.debug("%d %s" % (i, line.rstrip('\n')))
if line and re_translation.match(line):
translation = line
else:
logging.error("Line %d of file '%s' raising the exception: %s" % (i, self.fname, line))
raise Exception('invalid file')
line = f.readline()
i += 1
while line and line == u'\n':
line = f.readline()
i += 1
string = LocalizedString(comments, translation)
self.strings.append(string)
self.strings_d[string.key] = string
f.close()
def save_to_file(self, fname=None):
fname = self.fname if fname == None else fname
try:
f = open(fname, encoding='utf_8', mode='w')
except:
print 'Couldn\'t open file %s.' % fname
exit(-1)
# sort by key
self.strings.sort(key=lambda item: item.key)
for string in self.strings:
f.write(string.__unicode__())
f.close()
def merge_with(self, new):
merged = LocalizedFile()
for string in new.strings:
if self.strings_d.has_key(string.key):
new_string = copy(self.strings_d[string.key])
new_string.comments = string.comments
string = new_string
merged.strings.append(string)
merged.strings_d[string.key] = string
return merged
def update_with(self, new):
for string in new.strings:
if not self.strings_d.has_key(string.key):
self.strings.append(string)
self.strings_d[string.key] = string
def merge(merged_fname, old_fname, new_fname):
try:
old = LocalizedFile(old_fname, auto_read=True)
new = LocalizedFile(new_fname, auto_read=True)
merged = old.merge_with(new)
merged.save_to_file(merged_fname)
except Exception, inst:
logging.error('Error: input files have invalid format.')
raise
STRINGS_FILE = 'Localizable.strings'
def localize(path, excluded_paths):
languages = [os.path.join(path,name) for name in os.listdir(path) if name.endswith('.lproj') and os.path.isdir(os.path.join(path,name))]
print "languages found", languages
for language in languages:
original = merged = language + os.path.sep + STRINGS_FILE
old = original + '.old'
new = original + '.new'
if os.path.isfile(original):
try:
open(original, encoding='utf_8', mode='r').read()
os.rename(original, old)
except:
os.system('iconv -f UTF-16 -t UTF-8 "%s" > "%s"' % (original, old))
# gen
os.system('find %s -name \*.m -not -path "%s" | xargs genstrings -q -o "%s"' % (path, excluded_paths, language))
try:
open(original, encoding='utf_8', mode='r').read()
shutil.copy(original, new)
except:
os.system('iconv -f UTF-16 -t UTF-8 "%s" > "%s"' % (original, new))
# merge
merge(merged, old, new)
logging.info("Job done for language: %s" % language)
else:
os.system('genstrings -q -o "%s" `find %s -name "*.m" -not -path "%s"`' % (language, path, excluded_paths))
os.rename(original, old)
try:
open(old, encoding='utf_8', mode='r').read()
except:
os.system('iconv -f UTF-16 -t UTF-8 "%s" > "%s"' % (old, original))
if os.path.isfile(old):
os.remove(old)
if os.path.isfile(new):
os.remove(new)
def parse_options():
"""parse_options() -> opts, args
Parse any command-line options given returning both
the parsed options and arguments.
"""
parser = optparse.OptionParser(usage=USAGE, version=VERSION)
parser.add_option("-d", "--debug",
action="store_true", default=False, dest="debug",
help="Set to DEBUG the logging level (default to INFO)")
parser.add_option("-p", "--path",
action="store", type="str", default=os.getcwd(), dest="path",
help="Path (relative or absolute) to use for searching for *.lproj directories")
parser.add_option("-e", "--exclude",
action="store", type="str", default=None, dest="excluded_paths",
help="Regex for paths to exclude ex. ``./Folder1/*``")
opts, args = parser.parse_args()
return opts, args
if __name__ == '__main__':
opts, args = parse_options()
if opts.debug:
logging.getLogger().level = logging.DEBUG
if opts.path:
opts.path = os.path.realpath(opts.path)
if opts.excluded_paths:
opts.excluded_paths = os.path.realpath(opts.excluded_paths)
logging.info("Running the script on path %s" % opts.path)
localize(opts.path, opts.excluded_paths)
I use:
http://www.loc-suite.com
To only translate the new parts
I was having a similar issue. I changed a lot of keys for my NSLocalizedString-macros and was frightened that I'd ship the App with missing translations (didn't want to run through the whole App manually and check if everything's there either...).
I tried out the github project that Gabriella Petronella posted but I wasn't really that happy with it, so I wrote my own python module to accomplish what I wanted to do.
(I'm not gonna post the code here, since it's a whole module and not only one script :D)
Here is the couple of options you can chose to go with:
You can use some hand-written solution like the script mentioned above which will not completely rewrite the old files while adding a recently translated strings to them.
You can also create an additional strings.h file which will contain all the strings you do have so you will not need to rewrite them all the time, just in one place. So genstrings is not necessary anymore. However there is a con of using this: the string.h file will be unstructured which is probably not convenient for the big projects.
Thanks to Best practice using NSLocalizedString
// In strings.h
#define YOUR_STRING_KEY NSLocalizedString(#"Cancel", nil)
// Somewhere else in you code
NSLog(#"%#", YOUR_STRING_KEY);
I actually started using a tool called PhraseApp https://phraseapp.com/projects
It's worth looking into if you have to localise an app!

how does one compile a clisp program which uses cl-ppcre?

On Debian, I am trying to compile a CLISP program which uses the cl-ppcre package.
A sample, simplified program (which I will call variant 1) looks like this:
(asdf:load-system :cl-ppcre)
(princ (cl-ppcre:regex-replace-all "a" "abcde" "x"))
(terpri)
When I ran it thus::
clisp -q a3.lisp
I got this:
home:~/clisp/ercpp/compiling-program$ clisp -q a3.lisp
; Loading system definition from /usr/share/common-lisp/systems/cl-ppcre.asd into #<PACKAGE ASDF0>
; Registering #<SYSTEM :CL-PPCRE> as CL-PPCRE
; Registering #<SYSTEM :CL-PPCRE-TEST> as CL-PPCRE-TEST
0 errors, 0 warnings
xbcde
home:~/clisp/ercpp/compiling-program$
But when I tried to compile it thus:
clisp -q -c a3.lisp
I got this:
home:~/clisp/ercpp/compiling-program$ clisp -q -c a3.lisp
;; Compiling file /u/home/clisp/ercpp/compiling-program/a3.lisp ...
*** - READ from
#<INPUT BUFFERED FILE-STREAM CHARACTER
#P"/u/home/clisp/ercpp/compiling-program/a3.lisp" #3>
: there is no package with name "CL-PPCRE"
0 errors, 0 warnings
home:~/clisp/ercpp/compiling-program$
I got similar results with successful run and unsuccessful compile with variant 2:
(clc:clc-require :cl-ppcre)
(princ (cl-ppcre:regex-replace-all "a" "abcde" "x"))
(terpri)
What do I need to do to get it to compile?
In case it might help come up with an answer, I looked at the file I/O triggered by running variant 1. I used strace, and sliced and diced the output to show only names of relevant files and directories. When I did this:
strace -o strace.1 clisp -q a3.lisp
grep pcre strace.1 \
| sed -e 's/^[^"]*"//' \
| sed -e 's/".*$//' \
| sort \
| uniq \
> strace.2
I got this output:
(asdf:load-system :cl-ppcre)\n\n(p
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/api.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/charmap.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/charset.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/chartest.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/closures.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/convert.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/errors.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/lexer.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/optimize.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/packages.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/parser.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/regex-class-util.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/regex-class.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/repetition-closures.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/scanner.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/specials.fas
/u/home/.cache/common-lisp/clisp-2.48-unix-x86/usr/share/common-lisp/source/cl-ppcre/util.fas
/u/home/clisp/ercpp/compiling-program/cl-ppcre-test.asd
/usr/share/common-lisp/source/aima/cl-ppcre-test.asd
/usr/share/common-lisp/source/alexandria/cl-ppcre-test.asd
/usr/share/common-lisp/source/arnesi/cl-ppcre-test.asd
/usr/share/common-lisp/source/arnesi/src/cl-ppcre-extras.lisp
/usr/share/common-lisp/source/aspectl/cl-ppcre-test.asd
/usr/share/common-lisp/source/babel/cl-ppcre-test.asd
/usr/share/common-lisp/source/binary-types/cl-ppcre-test.asd
/usr/share/common-lisp/source/blowfish/cl-ppcre-test.asd
/usr/share/common-lisp/source/cedilla/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-acl-compat/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-asdf/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-cffi/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-fad/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-interpol/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-jpeg/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-launch/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-menusystem/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-pdf/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-photo/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-plplot/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-port/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-ppcre
/usr/share/common-lisp/source/cl-ppcre/.
/usr/share/common-lisp/source/cl-ppcre/api.fas
/usr/share/common-lisp/source/cl-ppcre/api.lisp
/usr/share/common-lisp/source/cl-ppcre/charmap.fas
/usr/share/common-lisp/source/cl-ppcre/charmap.lisp
/usr/share/common-lisp/source/cl-ppcre/charset.fas
/usr/share/common-lisp/source/cl-ppcre/charset.lisp
/usr/share/common-lisp/source/cl-ppcre/chartest.fas
/usr/share/common-lisp/source/cl-ppcre/chartest.lisp
/usr/share/common-lisp/source/cl-ppcre/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-ppcre/cl-ppcre-unicode.asd
/usr/share/common-lisp/source/cl-ppcre/cl-ppcre.asd
/usr/share/common-lisp/source/cl-ppcre/closures.fas
/usr/share/common-lisp/source/cl-ppcre/closures.lisp
/usr/share/common-lisp/source/cl-ppcre/convert.fas
/usr/share/common-lisp/source/cl-ppcre/convert.lisp
/usr/share/common-lisp/source/cl-ppcre/errors.fas
/usr/share/common-lisp/source/cl-ppcre/errors.lisp
/usr/share/common-lisp/source/cl-ppcre/lexer.fas
/usr/share/common-lisp/source/cl-ppcre/lexer.lisp
/usr/share/common-lisp/source/cl-ppcre/optimize.fas
/usr/share/common-lisp/source/cl-ppcre/optimize.lisp
/usr/share/common-lisp/source/cl-ppcre/packages.fas
/usr/share/common-lisp/source/cl-ppcre/packages.lisp
/usr/share/common-lisp/source/cl-ppcre/parser.fas
/usr/share/common-lisp/source/cl-ppcre/parser.lisp
/usr/share/common-lisp/source/cl-ppcre/regex-class-util.fas
/usr/share/common-lisp/source/cl-ppcre/regex-class-util.lisp
/usr/share/common-lisp/source/cl-ppcre/regex-class.fas
/usr/share/common-lisp/source/cl-ppcre/regex-class.lisp
/usr/share/common-lisp/source/cl-ppcre/repetition-closures.fas
/usr/share/common-lisp/source/cl-ppcre/repetition-closures.lisp
/usr/share/common-lisp/source/cl-ppcre/scanner.fas
/usr/share/common-lisp/source/cl-ppcre/scanner.lisp
/usr/share/common-lisp/source/cl-ppcre/specials.fas
/usr/share/common-lisp/source/cl-ppcre/specials.lisp
/usr/share/common-lisp/source/cl-ppcre/util.fas
/usr/share/common-lisp/source/cl-ppcre/util.lisp
/usr/share/common-lisp/source/cl-salza/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-split-sequence/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-statistics/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-utilities/cl-ppcre-test.asd
/usr/share/common-lisp/source/cl-who/cl-ppcre-test.asd
/usr/share/common-lisp/source/closer-mop/cl-ppcre-test.asd
/usr/share/common-lisp/source/contextl/cl-ppcre-test.asd
/usr/share/common-lisp/source/csv/cl-ppcre-test.asd
/usr/share/common-lisp/source/fiveam/cl-ppcre-test.asd
/usr/share/common-lisp/source/ftp/cl-ppcre-test.asd
/usr/share/common-lisp/source/getopt/cl-ppcre-test.asd
/usr/share/common-lisp/source/infix/cl-ppcre-test.asd
/usr/share/common-lisp/source/inflate/cl-ppcre-test.asd
/usr/share/common-lisp/source/ironclad/cl-ppcre-test.asd
/usr/share/common-lisp/source/iterate/cl-ppcre-test.asd
/usr/share/common-lisp/source/kmrcl-tests/cl-ppcre-test.asd
/usr/share/common-lisp/source/kmrcl/cl-ppcre-test.asd
/usr/share/common-lisp/source/lexer/cl-ppcre-test.asd
/usr/share/common-lisp/source/lw-compat/cl-ppcre-test.asd
/usr/share/common-lisp/source/md5/cl-ppcre-test.asd
/usr/share/common-lisp/source/metering/cl-ppcre-test.asd
/usr/share/common-lisp/source/net-telent-date/cl-ppcre-test.asd
/usr/share/common-lisp/source/onlisp/cl-ppcre-test.asd
/usr/share/common-lisp/source/pipes/cl-ppcre-test.asd
/usr/share/common-lisp/source/png/cl-ppcre-test.asd
/usr/share/common-lisp/source/ptester/cl-ppcre-test.asd
/usr/share/common-lisp/source/puri/cl-ppcre-test.asd
/usr/share/common-lisp/source/qbook/cl-ppcre-test.asd
/usr/share/common-lisp/source/readline/cl-ppcre-test.asd
/usr/share/common-lisp/source/regex/cl-ppcre-test.asd
/usr/share/common-lisp/source/reversi/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-bitcomp/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-bool-comp/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-cache/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-delayed/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-filter/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-fuzzy/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-mod/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-modal/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-queue/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-rand/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-random/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-rsa/cl-ppcre-test.asd
/usr/share/common-lisp/source/rsm-string/cl-ppcre-test.asd
/usr/share/common-lisp/source/rt/cl-ppcre-test.asd
/usr/share/common-lisp/source/series/cl-ppcre-test.asd
/usr/share/common-lisp/source/slime/cl-ppcre-test.asd
/usr/share/common-lisp/source/trivial-features/cl-ppcre-test.asd
/usr/share/common-lisp/source/uffi-tests/cl-ppcre-test.asd
/usr/share/common-lisp/source/uffi/cl-ppcre-test.asd
/usr/share/common-lisp/source/units/cl-ppcre-test.asd
/usr/share/common-lisp/source/url-rewrite/cl-ppcre-test.asd
/usr/share/common-lisp/source/usocket/cl-ppcre-test.asd
/usr/share/common-lisp/source/usocket/test/cl-ppcre-test.asd
/usr/share/common-lisp/source/yacc/cl-ppcre-test.asd
/usr/share/common-lisp/source/yaclml/cl-ppcre-test.asd
/usr/share/common-lisp/systems/cl-ppcre-test.asd
/usr/share/common-lisp/systems/cl-ppcre.asd
So what do I do?
If you compile some file which uses a package like (cl-ppcre:bar ...) then you need make sure that the package exists.
Compiling a statement like (asdf:load-system :cl-ppcre) does not cause loading the system at compile-time. Thus the package definition is also not loaded and executed. The compiler generates code for this statement, so that it only executes at load-time.
Either you load the system some way before you compile the file or you use
(eval-when (:compile-toplevel :load-toplevel :execute)
(asdf:load-system :cl-ppcre))
in the file to make sure that it is loaded into the compile-time environment.