Mistery many apps not loading

This is a Debian squeeze 64 system. I compile 1.4 from SVN without incident. The modules.conf has autoload=yes. There are 30+ modules that do exist, but do not load. for instance, app_readfile.so, and the CLI commands restart, and others are missing. It is like if it were a permissions problem, but I am root and all the relevant file belong to root. In an otherwise identical system, same set of configuration files (no diff), I get 137 modules loaded, and in this one I get 99. The amount of files in /usr/lib/asterisk/modules is identical, and so are the permissions.

Does anybody have any idea how can I make this system behave “normally”

“core restart” cannot be missing, as it in main/asterisk.c which is part of the main program, not a module.

“restart” without core is deprecated but was still present in 1.4.

Please look at the output of the “help” command. Other symptom that something is weird is that Asterisk cannot be killed with “killall asterisk”, only with “kill -9”. It looks like it did not finish loading, but if did. Asterisk does work, albeit 30+ apps are missing.
If I increase debug level to 30 and manually try “module load app_readfile.so”, having changed “logger.conf” to full=debug,etc. Nothing shows in the log, like I never did issue the command.

command=?
add ael agi cdr convert core database debug dialplan dnsmgr dont dump dundi extensions
feature file g729 group help http include indication init jabber keys load local logger
manager meetme module moh no realtime reload remove rtcp rtp say set show sip
sla soft stun transcoder udptl unload voicemail

command=help
ael debug contexts Enable AEL contexts debug (does nothing)
ael debug macros Enable AEL macros debug (does nothing)
ael debug read Enable AEL read debug (does nothing)
ael debug tokens Enable AEL tokens debug (does nothing)
ael nodebug Disable AEL debug messages
ael reload Reload AEL configuration
agi debug Enable AGI debugging
agi debug off Disable AGI debugging
agi dumphtml Dumps a list of agi commands in html format
agi show List AGI commands or specific help
cdr status Display the CDR status
core set debug channel Enable/disable debugging on a channel
core set debug Set level of debug chattiness
core set debug off Turns off debug chattiness
core set global Set global dialplan variable
core set verbose Set level of verboseness
core show applications Shows registered dialplan applications
core show application Describe a specific dialplan application
core show audio codecs Displays a list of audio codecs
core show channels Display information on channels
core show channel Display information on a specific channel
core show channeltypes List available channel types
core show channeltype Give more details on that channel type
core show codecs Displays a list of codecs
core show codec Shows a specific codec
core show config mappings Display config mappings (file names to config engines)
core show file formats Displays file formats
core show functions Shows registered dialplan functions
core show function Describe a specific dialplan function
core show globals Show global dialplan variables
core show hints Show dialplan hints
core show image codecs Displays a list of image codecs
core show image formats Displays image formats
core show switches Show alternative switches
core show translation Display translation matrix
core show uptime Show uptime information
core show video codecs Displays a list of video codecs
core waitfullybooted Wait until Asterisk has fully booted.
database del Removes database key/value
database deltree Removes database keytree/values
database get Gets database value
database put Adds/updates database value
database show Shows database contents
database showkey Shows database contents
dialplan add extension Add new extension into context
dialplan add ignorepat Add new ignore pattern
dialplan add include Include context in other context
dialplan reload Reload extensions and only extensions
dialplan remove extension Remove a specified extension
dialplan remove ignorepat Remove ignore pattern from context
dialplan remove include Remove a specified include from context
dialplan show Show dialplan
dnsmgr refresh Performs an immediate refresh
dnsmgr reload Reloads the DNS manager configuration
dnsmgr status Display the DNS manager status
dundi debug Enable DUNDi debugging
dundi flush Flush DUNDi cache
dundi lookup Lookup a number in DUNDi
dundi no debug Disable DUNDi debugging
dundi no store history Disable DUNDi historic records
dundi precache Precache a number in DUNDi
dundi query Query a DUNDi EID
dundi show entityid Display Global Entity ID
dundi show mappings Show DUNDi mappings
dundi show peers Show defined DUNDi peers
dundi show peer Show info on a specific DUNDi peer
dundi show precache Show DUNDi precache
dundi show requests Show DUNDi requests
dundi show trans Show active DUNDi transactions
dundi store history Enable DUNDi historic records
feature show Lists configured features
file convert Convert audio file
g729 debug Toggle g729 codec frame size statistics
group show channels Display active channels with group(s)
help Display help list, or specific help on a command
http show status Display HTTP server status
indication add Add the given indication to the country
indication remove Remove the given indication from the country
indication show Display a list of all countries/indications
jabber debug Enable Jabber debugging
jabber debug off Disable Jabber debug
jabber reload Reload Jabber configuration
jabber show connected Show state of clients and components
jabber test Shows roster, but is generally used for mog’s debugging.
keys init Initialize RSA key passcodes
keys show Displays RSA key information
local show channels List status of local channels
logger mute Toggle logging output to a console
logger reload Reopens the log files
logger rotate Rotates and reopens the log files
logger show channels List configured log channels
manager show command Show a manager interface command
manager show commands List manager interface commands
manager show connected List connected manager interface users
manager show eventq List manager interface queued events
manager show users List configured manager users
manager show user Display information on a specific manager user
meetme Execute a command on a conference or conferee
module load Load a module by name
module reload Reload configuration
module show List modules and info
module show like List modules and info
module unload Unload a module by name
moh reload Music On Hold
moh show classes List MOH classes
moh show files List MOH file-based classes
no debug channel
realtime load Used to print out RealTime variables.
realtime update Used to update RealTime variables.
rtcp debug ip Enable RTCP debugging on IP
rtcp debug Enable RTCP debugging
rtcp debug off Disable RTCP debugging
rtcp stats Enable RTCP stats
rtcp stats off Disable RTCP stats
rtp debug ip Enable RTP debugging on IP
rtp debug Enable RTP debugging
rtp debug off Disable RTP debugging
say load set/show the say mode
show parkedcalls Lists parked calls
sip history Enable SIP history
sip history off Disable SIP history
sip notify Send a notify packet to a SIP peer
sip prune realtime Prune cached Realtime object(s)
sip prune realtime peer Prune cached Realtime peer(s)
sip prune realtime user Prune cached Realtime user(s)
sip reload Reload SIP configuration
sip set debug Enable SIP debugging
sip set debug ip Enable SIP debugging on IP
sip set debug off Disable SIP debugging
sip set debug peer Enable SIP debugging on Peername
sip show channels List active SIP channels
sip show channel Show detailed SIP channel info
sip show domains List our local SIP domains.
sip show history Show SIP dialog history
sip show inuse List all inuse/limits
sip show objects List all SIP object allocations
sip show peers List defined SIP peers
sip show peer Show details on specific SIP peer
sip show registry List SIP registration status
sip show settings Show SIP global settings
sip show subscriptions List active SIP subscriptions
sip show users List defined SIP users
sip show user Show details on specific SIP user
sla show stations Show SLA Stations
sla show trunks Show SLA Trunks
soft hangup Request a hangup on a given channel
stun debug Enable STUN debugging
stun debug off Disable STUN debugging
transcoder show Display DAHDI transcoder utilization.
udptl debug Enable UDPTL debugging
udptl debug ip Enable UDPTL debugging on IP
udptl debug off Disable UDPTL debugging
voicemail show users List defined voicemail boxes
voicemail show zones List zone message formats