amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.57k stars 206 forks source link

installation error on windows wsl (debian) and ubuntu kvm #1363

Open answerwar opened 3 weeks ago

answerwar commented 3 weeks ago

Previously with respect, I would like to submit some of the obstacles that I experienced during the installation of the amber framework, the problem that I experienced was when building make there was an error There was a problem expanding macro '__concrete' Error: expecting token 'CONST', not '::',

I previously tried on wsl Ubuntu 22 and Debian windows but failed and I tried directly on a Linux VM but still failed with the same error,

OS : Windows 11 WSL (Debian 12 )

anwar@DESKTOP-SNI8CVN:/mnt/c/Users/ACER$ crystal -v Crystal 1.13.1 [0cef61e51] (2024-07-12)

LLVM: 18.1.6 Default target: x86_64-unknown-linux-gnu

OS : Linux ubuntu 22 (kvm) cloud image root@External-Hotspot-Tgr:/home/remala/amber# crystal -v Crystal 1.13.1 [0cef61e51] (2024-07-12)

LLVM: 18.1.6 Default target: x86_64-unknown-linux-gnu


error code

Building amber in /home/remala/amber/bin/amber
There was a problem expanding macro '__concrete'

Code in lib/optarg/src/lib/value_types/string_array.cr:3:5

 3 | __concrete Array(::String), et: ::String
     ^
Called macro defined in lib/optarg/src/lib/value_types/base.cr:5:5

 5 | macro __concrete(t, et = nil)

Which expanded to:

 > 10 |       
 > 11 |         alias ElementType = ::String
 > 12 |         alias ElementValue = ::Optarg::ValueTypes::::String::Value
                                                           ^
Error: expecting token 'CONST', not '::'
make: *** [Makefile:18: /home/remala/amber/bin/amber] Error 1

dependency install

root@External-Hotspot-Tgr:/home/remala/amber# shards install
Resolving dependencies
Fetching https://github.com/amberframework/amber-router.git
Fetching https://github.com/amberframework/cli.git
Fetching https://github.com/elorest/compiled_license.git
Fetching https://github.com/jeromegn/kilt.git
Fetching https://github.com/jeromegn/slang.git
Fetching https://github.com/dare892/liquid.cr.git
Fetching https://github.com/amberframework/micrate.git
Fetching https://github.com/will/crystal-pg.git
Fetching https://github.com/crystal-lang/crystal-mysql.git
Fetching https://github.com/crystal-lang/crystal-sqlite3.git
Fetching https://github.com/stefanwille/crystal-redis.git
Fetching https://github.com/luckyframework/shell-table.cr.git
Fetching https://github.com/phoffer/inflector.cr.git
Fetching https://github.com/amberframework/teeplate.git
Fetching https://github.com/crystal-loot/exception_page.git
Fetching https://github.com/crystal-lang/yaml_mapping.cr.git
Fetching https://github.com/crystal-ameba/ameba.git
Fetching https://github.com/amberframework/optarg.git
Fetching https://github.com/crystal-lang/json_mapping.cr.git
Fetching https://github.com/crystal-lang/crystal-db.git
Fetching https://github.com/ysbaddaden/pool.git
Fetching https://github.com/crystal-community/future.cr.git
Fetching https://github.com/sija/backtracer.cr.git
Fetching https://github.com/amberframework/callback.git
Shard "inflector" version (0.1.8) doesn't match tag version (1.0.0)
Installing amber_router (0.4.4)
Installing callback (0.9.2)
Installing optarg (0.9.3)
Installing cli (0.11.4)
Installing compiled_license (1.2.2)
Installing kilt (0.6.1)
Installing slang (1.7.3)
Installing inflector (1.0.0)
Installing json_mapping (0.1.1)
Installing liquid (0.4.1 at e4ef5ca)
Installing db (0.11.0)
Installing pg (0.26.0)
Installing mysql (0.14.0)
Installing sqlite3 (0.19.0)
Installing micrate (0.15.1)
Postinstall of micrate: shards build
Installing pool (0.3.0)
Installing redis (2.8.3)
Installing shell-table (0.9.3)
Installing future (1.0.0)
Installing teeplate (0.11.2)
Installing backtracer (1.2.2)
Installing exception_page (0.3.1)
Installing yaml_mapping (0.1.1)
Installing ameba (1.5.0)
Postinstall of ameba: shards build -Dpreview_mt
Writing shard.lock
Shard "ameba" may be incompatible with Crystal 1.13.1

thank

Blacksmoke16 commented 3 weeks ago

This'll be resolved via https://github.com/amberframework/optarg/pull/6. Will need someone to merge/tag a release for that dep.

chenrui333 commented 19 hours ago

running into the same issue, can someone helps with it? Thanks!