Giter VIP home page Giter VIP logo

Comments (4)

nwnlp avatar nwnlp commented on August 17, 2024

upgrade your gcc like: brew install gcc@8

from alphafm.

rotcx avatar rotcx commented on August 17, 2024

upgrade your gcc like: brew install gcc@8

gcc version is 9 currently

gcc -v
Using built-in specs.
COLLECT_GCC=gcc-9
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_3/libexec/gcc/x86_64-apple-darwin18/9.2.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with: ../configure --build=x86_64-apple-darwin18 --prefix=/usr/local/Cellar/gcc/9.2.0_3 --libdir=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.2.0_3' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 9.2.0 (Homebrew GCC 9.2.0_3)

from alphafm.

rotcx avatar rotcx commented on August 17, 2024

upgrade your gcc like: brew install gcc@8

g++ -v
Using built-in specs.
COLLECT_GCC=g++-9
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_3/libexec/gcc/x86_64-apple-darwin18/9.2.0/lto-wrapper
Target: x86_64-apple-darwin18
Configured with: ../configure --build=x86_64-apple-darwin18 --prefix=/usr/local/Cellar/gcc/9.2.0_3 --libdir=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.2.0_3' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Thread model: posix
gcc version 9.2.0 (Homebrew GCC 9.2.0_3)

from alphafm.

rotcx avatar rotcx commented on August 17, 2024

upgrade your gcc like: brew install gcc@8

if I used gcc to complie

/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h:192:21: error: static assertion failed: unordered container must have the same value_type as its allocator
192 | static_assert(is_same<typename _Alloc::value_type, _Value>{},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

gcc -O3 fm_train.cpp src/Frame/pc_frame.cpp src/Utils/utils.cpp -I . -std=c++11 -o bin/fm_train -lpthread
In file included from /usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/unordered_map:46,
from src/FTRL/ftrl_model.h:4,
from src/FTRL/ftrl_trainer.h:5,
from fm_train.cpp:5:
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h: In instantiation of 'class std::_Hashtable<const char*, std::pair<const char* const, ftrl_model_unit >, my_allocator<std::pair<const char*, ftrl_model_unit >, float, ftrl_model_unit>, std::__detail::_Select1st, my_equal, my_hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >':
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/unordered_map.h:105:18: required from 'class std::unordered_map<const char*, ftrl_model_unit, my_hash, my_equal, my_allocator<std::pair<const char*, ftrl_model_unit >, float, ftrl_model_unit> >'
src/FTRL/ftrl_model.h:204:20: required from 'class ftrl_model'
src/FTRL/ftrl_trainer.h:191:14: required from 'ftrl_trainer::ftrl_trainer(const trainer_option&) [with T = float]'
fm_train.cpp:40:21: required from 'int train(const trainer_option&) [with T = float]'
fm_train.cpp:87:32: required from here
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h:192:21: error: static assertion failed: unordered container must have the same value_type as its allocator
192 | static_assert(is_same<typename _Alloc::value_type, _Value>{},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h:275:21: error: static assertion failed: Cache the hash code or qualify your functors involved in hash code and bucket index computation with noexcept
275 | static_assert(noexcept(declval<const __hash_code_base_access&>()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276 | ._M_bucket_index((const __node_type*)nullptr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277 | (std::size_t)0)),
| ~~~~~~~~~~~~~~~~
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h: In instantiation of 'class std::_Hashtable<const char*, std::pair<const char* const, ftrl_model_unit >, my_allocator<std::pair<const char*, ftrl_model_unit >, double, ftrl_model_unit>, std::__detail::_Select1st, my_equal, my_hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true> >':
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/unordered_map.h:105:18: required from 'class std::unordered_map<const char*, ftrl_model_unit, my_hash, my_equal, my_allocator<std::pair<const char*, ftrl_model_unit >, double, ftrl_model_unit> >'
src/FTRL/ftrl_model.h:204:20: required from 'class ftrl_model'
src/FTRL/ftrl_trainer.h:191:14: required from 'ftrl_trainer::ftrl_trainer(const trainer_option&) [with T = double]'
fm_train.cpp:40:21: required from 'int train(const trainer_option&) [with T = double]'
fm_train.cpp:89:29: required from here
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h:192:21: error: static assertion failed: unordered container must have the same value_type as its allocator
192 | static_assert(is_same<typename _Alloc::value_type, _Value>{},
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/Cellar/gcc/9.2.0_3/include/c++/9.2.0/bits/hashtable.h:275:21: error: static assertion failed: Cache the hash code or qualify your functors involved in hash code and bucket index computation with noexcept
275 | static_assert(noexcept(declval<const __hash_code_base_access&>()
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
276 | ._M_bucket_index((const __node_type*)nullptr,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
277 | (std::size_t)0)),
| ~~~~~~~~~~~~~~~~
src/Frame/pc_frame.cpp: In member function 'bool pc_frame::init(pc_task&, int, int, int)':
src/Frame/pc_frame.cpp:9:27: warning: 'int sem_init(sem_t*, int, unsigned int)' is deprecated [-Wdeprecated-declarations]
9 | sem_init(&semPro, 0, 1);
| ^
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/semaphore.h:29,
from src/Frame/pc_frame.h:11,
from src/Frame/pc_frame.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:5: note: declared here
55 | int sem_init(sem_t , int, unsigned int) __deprecated;
| ^~~~~~~~
src/Frame/pc_frame.cpp:9:27: warning: 'int sem_init(sem_t
, int, unsigned int)' is deprecated [-Wdeprecated-declarations]
9 | sem_init(&semPro, 0, 1);
| ^
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/semaphore.h:29,
from src/Frame/pc_frame.h:11,
from src/Frame/pc_frame.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:5: note: declared here
55 | int sem_init(sem_t , int, unsigned int) __deprecated;
| ^~~~~~~~
src/Frame/pc_frame.cpp:10:27: warning: 'int sem_init(sem_t
, int, unsigned int)' is deprecated [-Wdeprecated-declarations]
10 | sem_init(&semCon, 0, 0);
| ^
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/semaphore.h:29,
from src/Frame/pc_frame.h:11,
from src/Frame/pc_frame.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:5: note: declared here
55 | int sem_init(sem_t , int, unsigned int) __deprecated;
| ^~~~~~~~
src/Frame/pc_frame.cpp:10:27: warning: 'int sem_init(sem_t
, int, unsigned int)' is deprecated [-Wdeprecated-declarations]
10 | sem_init(&semCon, 0, 0);
| ^
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/semaphore.h:29,
from src/Frame/pc_frame.h:11,
from src/Frame/pc_frame.cpp:1:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/semaphore.h:55:5: note: declared here
55 | int sem_init(sem_t *, int, unsigned int) __deprecated;
| ^~~~~~~~

from alphafm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.